Hello, like before when I am trying to perform actions like updating the records in table by clicking submit on form from sample database - the ui bakery is showing error like ‘UPDATE command denied to user’ and now when I am trying to connect my own datasource it is showing ‘connection timeout’ or ‘ECONNECTIONREFUSED’, I have tried reinstalling the mysql, followed steps from stackoverflow - but it isn’t working. Please help me out - I have shared the screenshots of the errors. Thanks and regards
Hi @Anirudh_Sharma,
Thanks for reaching out.
Our cloud instance can’t access your local database (with no extra configurations).
There are three options:
- ngrok proxy
- SSH tunnel
- on-premise version of UI Bakery
I hope it helps.
This does not seem to be the case. I just tested it by creating a new user in the DB on my server, went to https://cloud.uibakery.io/ and added the data source. No issues at all, I was able to connect.
As for why you, @Anirudh_Sharma, had problems, it’s probably because you did not create the user correct. Looking at the queries from your first image it should be quite obvious, since only CREATE DATABASE test_datasource
yielded no error.
Now, why did the create user query fail? Well, because you forgot one tiny thing: a semicolon (;
) at the end of the CREATE USER ...
query. This led mysql to seeing the CREATE USER ...
and the CREATE DATABASE test_datasource
right after as one single query, which threw the syntax error.
Furthermore the authentication with the root user can’t work, unless you altered the host of the default root user. By default, the root user is defined as 'root'@'localhost'
, meaning you can only log in as root from the machine where mysql is running, so locally.
Everything should work if you do it again with the correct syntax, don’t forget the semicolon!
But honestly… how can you ignore so many error messages and still expect it work?
Hey @Max,
Thanks for jumping in!
Unfortunately, it is
Second screenshot shows our cloud IP for whitelisting instead of @Anirudh_Sharma’s DB IP. And the third one — contains localhost
, that won’t work on cloud.
Hey Matvey
You are right about that, it cannot work with UIBakery’s cloud IP nor localhost, @Anirudh_Sharma needs to enter the IP of his server in any case. But doing so should make it work!
But I didn’t understand why its happening as I also have whitelisted the ips in my firewall as well as in my.ini config files. @Max told with his system it is working?
@Max I have created new user with the ip address mentioned in bakery ui - I don’t screenshots of it now but the command got executed and the user also got created then also when I try to connect then it is loading for long time and showing ECONNECTTIMEOUT and with localhost or 127.0.0.1 it is showing can’t connect, I have tried many solution it isn’t working for postresql and mysql. Working for google sheets, etc cases only.
@Anirudh_Sharma What IP address did you enter as Host
in UIBakery?
And yeah, localhost
and 127.0.0.1
cannot work, that would try to connect to a database on the servers of UIBakery and not yours.
Max used his own SQL server, accessible from the internet.
You’re trying to connect with localhost
instead. UI Bakery server can’t connect to the locally hosted database as UI Bakery instance is not in your network. You would need to use publicly available IP address.
Last just for clarification it means I can only connect it with online database tools like https://supabase.com/ ??
No it doesn’t mean that. Supabase is an option too.
But you can connect even to your local database, following the guides from my first reply: I am unable to connect to mysql data source and postresql also - #2 by spherebread
Generally the steps are like this:
-
Set up a database (MySQL, MongoDB, Supabase, etc.) either on your pc or on a server, a server would be preferable. The important part is that you must be able to connect to the database from the internet.
When connecting a database on UIBakery you can see all the available DBMS that can be used:
-
Create your schemas, tables and a user dedicated for UIBakery. You don’t necessarly need a dedicated user, but it would be better.
-
Connect your database to UIBakery, meaning it will access the database on your server/pc through the internet.
So for example, let’s say you’ve set up a MySQL database on a server. The servers public IP is something like 91.107.238.79
(there are many resources online on how to find your public IP), this is the IP for the Host
field in UIBakery. We also created the user 'uibakery@'52.176.109.125''
(as mentioned in this thread before, 52.176.109.125
is the IP of UIBakery’s cloud). So for the field Username
we’ll enter “uibakery” and obviously in Password
the password we set for the user. And lastly for Database
enter the name of the schema you want to use.