Performing a Database Connection to a mySQL DB in Docker

I am unable to connect to the mySQL database named reflections. I have successfully connected to it via mySQLWorkbench both locally and remotely. I just can’t get a successful “Database Connection”.

Screenshot of Wappler:

Screenshot of the Project Target Settings - Top Half:

Screenshot of the Project Target Settings - Bottom Half:

Screenshot of the Database Connection:

Screenshot of the Error Message when testing the Database Connection:

Other notes:

  1. I tried with port 9906. No success.
  2. I tried with Server Address as “LocalDev” and “localhost” with and without “http://” - No success.
  3. I tried with my “root” username and logon. - No success.
  4. I tried changing the connection properties to “reflections” and “LocalDev”. - No success.

Hope someone out there can advise me as to what the correct settings should be.

Click on the folder to select the database connection that was set up when you deployed your app. I found that if you go into the connection, it’s connecting on port 3306, not 9906 (even though in my mySQL editor I’m connecting via 9906.)

Note: I found the answer in this post: Docker database cant connect

1 Like