News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Unable to connect to database after applying 2.0.14 patch

Started by Turrican3, May 17, 2017, 06:59:46 AM

Previous topic - Next topic

Arantor

No, it's not, it's about the underlying connector - mysql and mysqli both use underlying libraries to connect to MySQL itself, whether that's libmysqlclient or mysqlnd.

What happened here is that your database was set up such that it had a 4.0 (or older) style password set up and mysqlnd can't make use of that but libmysqlclient can. Reset the database password via cPanel or similar.

Turrican3

Ok got it, I stand corrected then.
(please understand it was an honest question by the way, didn't want to act pretentious and I apologize if I actually sounded like I did, wasn't my intention)

Arantor

No, not pretentious, just wanted to make sure that the real cause was understood - because if not, it's all too easy to get hung up and spend time trying to fix a problem that isn't there.

Turrican3


SleePy

Well I should note while the mysql client can tell us to that the password is not compatible and needs updated, we can't fix that on our side because the client (mysqlnd) can't make the old style password connections.  If it could do that, we could correct this by connecting across the old method and issuing a update.

I've fixed a few passwords that broke after the update by simply login in as that user and running:

SET password=PASSWORD('theDatabasePasswordHere');


This causes the password format to be updated to a 4.1+ compatible one.  Your hosts cPanel usually has to do this though if you can't connect across a cli interface to mysql yourself.
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:GitHub
Join us on IRC Libera.chat/#smf


Advertisement: