Cannot connect to MySQL Database

Wappler Version : 4.1.2
Operating System : Windows 11
Server Model: PHP
Database Type: MySQL
Hosting Type: Custom

I apologize if this is a rather incomplete report, but this is a super weird issue that has been happening to me recently.

Within Wappler I have added my MySQL database, in both the Database Manager and in Server Action Globals. The Database Manager in Wappler can connect to the MySQL database just fine and can view its tables, however, the exact same database in the global sections of Wappler cannot as it reports an incorrect password.

Both have the exact same password and info set, and just to be sure I tried recreating the database multiple times. Not only this but HeidiSQL can also connect to the database just fine locally, like the Wappler database manager.

The “Test” button also connects in the Database manager, but not in globals. I’m positive it’s nothing to do with the server itself seeing as Wappler can connect to it correctly in one place, but not the other, and also as HeidiSQL can connect just fine.

I had this issue about a month ago in another project file but ended up not going ahead with the project so never resolved it. This is my first new project since then, and I am running into the same issue.

Edit: Just to be extra extra sure it isn’t a MySQL server issue, I reinstalled MySQL. Same issue where the database manager can connect and so can other clients, but not in globals.

This is how both options work and they work differently:

  • Database manager makes a direct connection (remote connection) to your mysql server. So it connects right from your computer to where the mysql is hosted.

  • The Database Connections in server connect do not make direct connections. They connect from the selected project target. A connection file is being generated, pushed to the selected target and then connects from there. So if the web server and mysql server are hosted on the same hosting/place this is usual a local connection (local for the server).

So sometimes these are different - credentials and details for direct connections and local connections.
If you can connect to the mysql server using the database manager it should connect from server connect using the same credentials.

Can you post a screenshot of the exact error message?
What hosting are you using?