PHP Fatal error: Uncaught mysqli_sql_exception 😡

PHP Fatal error: Uncaught mysqli_sql_exception: Connection refused (again :sob: )

This time on a working (Until now working fine for over 1½ month), CRM instance installation for a client.

I’ve changed the password several times and attempting to use less complex easy / even stupid passwords to get around this annoying bug, no luck to far.

And yes; I can login with the DB user name/DB name on the Linux prompt:

From the logs:

PHP Fatal error: Uncaught mysqli_sql_exception: Access denied for user 'work1'@'' (using password: YES) in /var/www/vhosts/
Stack trace:
#0 /var/www/vhosts/ mysqli_connect()
#1 /var/www/vhosts/ MysqliManager->connect()
#2 /var/www/vhosts/ DBManagerFactory::getInstance()
#3 /var/www/vhosts/ require_once('...')
#4 {main}
thrown in /var/www/vhosts/ on line 327

Line 327 as referred to in the error log.

and line 151…

Thoughts? :thinking:

Thanks in advance.


I’ve solved it myself :white_check_mark:

This time SuiteCRM suddenly “hated” my DB user´s name and decided to start refusing connection to MariaDB. I added and new user with a less complex name and deleted the old user, (Only lower characters and no symbols/numbers) and BOOM!
It accepted it and now it is working.

Really annoying! :dizzy_face:

1 Like

I’d like to get any bugs regarding this, solved for good.

Can you reproduce the issue? Can you provide a specific user name that causes trouble with mysql logins due to some weird character?

1 Like

For sure, I can DM you the database user name.

I have no logical reason/idea too why SuiteCRM after working fine for 1½ -2 months suddenly has a change of mind and decides to hate the DB user name. I just weirdly happened randomly I suppose.
That beats me.