Jump to content

Prestashop 1.7.5 - cannot connect to MySQL 8.0 during installation


Recommended Posts

Hello everyone,

I am struggling with this error for two days now and cannot complete the setup process for some reason I cannot understand.

I am stuck at step 4 of the installation. I get an error message: "Database Server is not found. Please verify the login, password and server fields (DbPDO)". The problem is, all data and creditentials are 100% correct. I have tried 127.0.0.1, localhost, external IP and schemas with different names/types. This is a standalone server, with setup done from scratch on FreeBSD. I have created multiple users and multiple schemas in MySQL - together with various combinations of administrative authorizations/schema rights. Everything works as a charm when using MySQL CLI or Workbench from my desktop - I can log in with any user I want, make changes to schemas, etc. I have used sockstat to check if the port 3306 is open on both localhost and external address (FFS, it has to be, as I can connect both locally and from the Workbench). Unfortunately, prestashop refuses to give me any detailed information what is wrong with my DB setup, even when turning on DEV mode in configuration files.

Can anyone suggest what I might be doing wrong here? Is there any other place I should check, maybe DB configuration? Still, why is there no problem connecting from other sources? Maybe it is an issue with correct owner/rights combination on some files? Honestly, I am completely out of ideas ATM. To make matters a little bit mor crazy, I have done exactly the same setup about two weeks ago and everything worked like a charm!

Kindest regards

Share this post


Link to post
Share on other sites

To my surprise, I have just found the solution to my problem. It seems Prestashop does not like the new default auth settings in MySql 8.0 (caching_sha2_password). You have to change it during MySQL initialization or from the CLI to Standard:

alter user 'prestashopuser'@'%' identified with mysql_native_password by 'your_password';

Cheers!

  • Like 4

Share this post


Link to post
Share on other sites
  • 10 months later...
On 1/13/2019 at 9:16 PM, niubio said:

To my surprise, I have just found the solution to my problem. It seems Prestashop does not like the new default auth settings in MySql 8.0 (caching_sha2_password). You have to change it during MySQL initialization or from the CLI to Standard:

alter user 'prestashopuser'@'%' identified with mysql_native_password by 'your_password';

Cheers!

Same issue with 1.7.6.2 and your solution worked. What is your experience with mysql80 on Prestashop any other issues?

Share this post


Link to post
Share on other sites
  • 2 weeks later...
1 hour ago, stormer90 said:

You should be install MySql5 instead of MySql8.0

In order to use MySql8.0. I think we should be enable extension in PHP which allow connect PHP to MySQL8.0

Actually mysql80 is working and Ok on my test server with 1.7.6.2 and I have no complaints on it except its greed for RAM. But production is always a production and its always interesting to know someone's experience about the issue.

Share this post


Link to post
Share on other sites
  • 4 months later...
On 1/13/2019 at 7:16 PM, niubio said:

To my surprise, I have just found the solution to my problem. It seems Prestashop does not like the new default auth settings in MySql 8.0 (caching_sha2_password). You have to change it during MySQL initialization or from the CLI to Standard:

alter user 'prestashopuser'@'%' identified with mysql_native_password by 'your_password';

Cheers!

Thank you so much for this!! Worked for me!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More