# Need toconnect to MySQL

**URL:** https://community.weweb.io/t/need-toconnect-to-mysql/7276
**Category:** Ask us anything
**Tags:** design
**Created:** [February 26, 2024, 10:05pm UTC](https://community.weweb.io/t/need-toconnect-to-mysql/7276 "2024-02-26T22:05:08Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Mage](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mage/32/7972_2.png) [@Mage](https://community.weweb.io/u/Mage)
#### Post date: [February 26, 2024, 10:05pm UTC](https://community.weweb.io/t/need-toconnect-to-mysql/7276/1 "2024-02-26T22:05:08Z")

</div>

I am very new to WeWeb and looking to build an SaaS usin MySQL as the database. The notes on the SQL API suggest it is not secure enough for a web app and so I am asking for recommendations.

---

<div class="post-metadata">

### Author: ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)
#### Post date: [February 27, 2024, 11:04am UTC](https://community.weweb.io/t/need-toconnect-to-mysql/7276/2 "2024-02-27T11:04:27Z")

</div>

I’d suggest using a middle layer (API) such as Fastgen or others as by executing SQL client-side, unless it’s a closed app (not exactly the definition of SaaS) you’re exposing yourself to SQL injection and vulnerabilites. If you like SQL, you might love Supabase, which is built on PostgreSQL and they incorporate it pretty well into everything.

---

<div class="post-metadata">

### Author: ![Mage](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mage/32/7972_2.png) [@Mage](https://community.weweb.io/u/Mage)
#### Post date: [February 27, 2024, 1:49pm UTC](https://community.weweb.io/t/need-toconnect-to-mysql/7276/3 "2024-02-27T13:49:27Z")

</div>

Thanx Broberto.

I took a quick look at Supabase and this is my understanding of what they are doing. They are hosting PostgreSQL with a the API layer that does what your say on the SQL end and there is a Supabase plugin on the WeWeb side so the connection should be simpler & more secure. Is this correct?

---

<div class="post-metadata">

### Author: ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)
#### Post date: [February 27, 2024, 1:53pm UTC](https://community.weweb.io/t/need-toconnect-to-mysql/7276/4 "2024-02-27T13:53:51Z")

</div>

Yes, and they also provide all the other services like Auth and Storage 🙂

---

<div class="post-metadata">

### Author: ![Mage](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mage/32/7972_2.png) [@Mage](https://community.weweb.io/u/Mage)
#### Post date: [February 27, 2024, 2:12pm UTC](https://community.weweb.io/t/need-toconnect-to-mysql/7276/5 "2024-02-27T14:12:19Z")

</div>

Do you know if the WeWeb plugin for Supabase, communicates directly to use the Auth?

---

<div class="post-metadata">

### Author: ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)
#### Post date: [February 27, 2024, 3:05pm UTC](https://community.weweb.io/t/need-toconnect-to-mysql/7276/6 "2024-02-27T15:05:58Z")

</div>

Yes, it authenticates every request you send and then it’s up to Supabase to decide what to do with it.

---

<div class="post-metadata">

### Author: ![Mage](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mage/32/7972_2.png) [@Mage](https://community.weweb.io/u/Mage)
#### Post date: [February 27, 2024, 3:15pm UTC](https://community.weweb.io/t/need-toconnect-to-mysql/7276/7 "2024-02-27T15:15:15Z")

</div>

I will test this out. It looks like Supabase can be self-hosted too.

---

<div class="post-metadata">

### Author: ![Mage](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/mage/32/7972_2.png) [@Mage](https://community.weweb.io/u/Mage)
#### Post date: [February 28, 2024, 10:03pm UTC](https://community.weweb.io/t/need-toconnect-to-mysql/7276/8 "2024-02-28T22:03:16Z")

</div>

I am told by my web server expert (who hosts the SQL I wan to use) that is we turn on SSL there should be no security issues using the WeWeb SQL plugin.

---

<div class="post-metadata">

### Author: ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)
#### Post date: [February 28, 2024, 10:10pm UTC](https://community.weweb.io/t/need-toconnect-to-mysql/7276/9 "2024-02-28T22:10:28Z")

</div>

> **[Exploits of a Mom](https://xkcd.com/327/)**
>
> Her daughter is named Help I'm trapped in a driver's license factory.
