You don't have to make a new DB or even change the password. You just need to set the password again and specify that it be saved in the new format to make the mysqlnd driver happy.
To fix it, just update the password.
mysql> SET @@session.old_passwords = 0;
Query OK, 0 rows affected (0.00 sec)
SET PASSWORD FOR 'existinguser'@'localhost' = PASSWORD('existingpass');
Query OK, 1 rows affected (0.00 sec);
This will ensure that the password is saved in the new format. Other modern clients shouldn't have a problem connecting using this new format. (including mysql, mysqli and pdo) The only exception is anything built in C with the pre-4.1 driver. If you're only connecting with php, then you'll be fine.
Since you've got an existing application. I'd make a new mysql user just for the laravel application and set a new password. That makes everyone happy. Your old stuff can still connect the way it always has and your shiny new laravel app can connect too.
The info is in the mysql docs. Google for 'mysql docs password-hashing.html'. Should be the first result.
@derak-kilgo thanks for the feedback probably correct about setting the app a new user etc. Will give this ago and get back to this either way. Thanks
UPDTAE well this db is on a shared server but with a chat to the suppliers they sorted it out for me. as above.
much appreciated saved some work :-)
@simondavies I had the same issue on a shared environment (hosting service provider of one of my clients), and I could run the commands above by connecting to their MySQL server using a MySQL client (Sequel Pro in my case), but of course you need remote connection configured for this.
Somebody said that it works as well from PHPMyAdmin if you run both commands in one go, but I didn't get the chance to test it:
SET @@session.old_passwords = 0;
SET PASSWORD FOR 'existinguser'@'localhost' = PASSWORD('existingpass');
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community