Hello there. I am new in bubble, but I already made a great progress in a lot of things, BUT, since 5 days ago I can not figure out how to use an external MySQL database using a SQL Database Connector plugin.
I did already connect successfully with my website database ( using the “TEST THE CONNECTION” button no error came out ) . . . . but . . .I can not make a simple table with Repeating Group tool . . . .
Any particular reason you want to connect to an external DB instead of using Bubble’s built in DB? …Using Bubble’s database is usually more performant and also easier to set-up and maintain. Just FYI, since it may be helpful in avoiding this challenge altogether.
I second what @sridharan.s is saying. I was considering trying to figure out how to connect a SQL database because my app relies on using over 600K rows of preloaded data and many numerous connections with other things in the data base. This took about two weeks to get into Bubble (between uploading the initial data, finding duplicates etc, modifying the data by csv upload to create connections among them). I thought maybe it would be better to avoid all this and simply connect an external DB. Now that I have uploaded all this though, everything works like a charm an bubble has had no issues handling this amount of data in a single table. Essentially, my takeaway from this experience was that whenever I have the option of doing something within bubble, go the bubble route. This will pay dividends in the future because there are fewer things to maintain/monitor on your end.
Sorry that I was not able to help with your actual question though! I just wanted to provide an additional perspective from someone who was considering going down that route. If you still want to connect an external SQL DB though, I know this is something many bubble users have had success with.
Assuming there are valid reasons for having a connection, like ongoing updates …
Once you’ve got the connection working, next on the same plugin page, create a query, with something like
SELECT * FROM mytable LIMIT 200
If you add parameters, in the query put a ? as a placeholder to bind the parameter, example for two parameters:
SELECT * FROM mytable WHERE mycolumn1 = ? AND mycolumn2 LIKE ? LIMIT 200
Set the “Use as” to “Data” if you will refer to it directly as a data source, or “Action” if using it as a workflow step, then a following step refers to its results.
Once the query has been initialized, it creates a pseudo data type, that you can set your repeating group to.
@Bubbler, I haven’t tried myself but I hear it’s noticeably slower. Perhaps someone who has experience with both approaches can chime in on the performance difference?
Hello @sridharan.s ! I really need to do this connection at this time, because we will test bubble.is as a part of a big solution system that is already implemented.
As this application, that we are improving a lot with Bubble tools, become stable and if bubble becomes the primary source of the information and usage, we surely will migrate the compleat database to the internal bubble´s DB !
Thanks you @ryanellman for sharing your experience !
I have no doubt that bubble can handle the amount of data we need at this time, but we prefer to test it first and, step by step, we will migrate our data to bubble !
No problem! That makes sense. When you get to the point of migrating data to Bubble, feel free to send me any questions you have - I have extensive experience uploading a frustratingly large amount of data!