Error using this Database Connection! Server Response : SQLSTATE[HY000] No such file or directory

Hey everyone,

I’m unable to connect to my database via the Server Connect Global Database Connections. I’m able to connect via the Database Manager.

The fact I can’t connect using Server Connect means that all my Server Connect actions cannot connect to the database.

The only thing that changed today was that I updated from last week’s version of Wappler to this week’s.

I am running a Local Docker instance:
PHP, MySQL 8.0x

I am able to connect using the DB Manager:

But when using the Server Connect Global Database Connections with the following DB config:

I get the error:
Error using this Database Connection! Server Response : SQLSTATE[HY000] No such file or directory

I’ve read through the forum and @Teodor in one post suggested deleting “dmxConnectLib” which I tried and no luck.

Does anyone know why I’m able to connect using the DB Manager (and MySQL Workbench) but I’m unable to connect using (the same settings) the Server Connect Global Database Connections and how to fix this?

Try using 127.0.0.1 instead of localhost, see:

Hey @George. I tried replacing the server address with 127.0.0.1 however now I’m getting a “Connection refused” error:

I went to my Target Configuration screen to make sure I have the right credentials and I do so connection refused due to bad credentials doesn’t make sense right?

The other question that comes to mind is… is this a MySQL issue or a Wappler issue. Since I can connect to my local DB using MySQL Workbench I suspect it’s a Wappler issue. But I’m not experienced so I may very well be quite wrong.

Is this a docker database? How did it get created and what are the settings?

@George I was able to fix this issue.

Somehow my Global Database Connections db file got corrupted.

I deleted the file, then went into the corresponding Project Settings target, clicked to show DB passwords then pressed save. This triggered Wappler creating a new Global DB connection file which now works.

1 Like

Yes it’s a Docker DB. The DB got created when I first created the project. Issue is resolved, please see post above.

Good to know - yes when it is docker you don’t have to manage separate database connections everything is generated by the project target settings. So usually reapplying those settings solves everything indeed.