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'@'testdatabase.net' (using password: YES) in /var/www/vhosts/crm.something.com/public_html/include/database/MysqliManager.php:327
Stack trace:
#0 /var/www/vhosts/crm.something.com/public_html/include/database/MysqliManager.php(327): mysqli_connect()
#1 /var/www/vhosts/crm.something.com/public_html/include/database/DBManagerFactory.php(151): MysqliManager->connect()
#2 /var/www/vhosts/crm.something.com/public_html/include/entryPoint.php(186): DBManagerFactory::getInstance()
#3 /var/www/vhosts/crm.something.com/public_html/index.php(47): require_once('...')
#4 {main}
thrown in /var/www/vhosts/crm.something.com/public_html/include/database/MysqliManager.php on line 327


Line 327 as referred to in the error log.


and line 151…

Thoughts? :thinking:

Thanks in advance.

Hmmm…

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.