New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't install Craft on MySQL 8 #3021
Comments
Have confirmed this is an issue, but still investigating if there is anything we can do about it at the application layer. Seems like solutions to this are all more server side changes. Context: https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/ |
Setting up local server with valet and ran into this same issue:
Any solution for this? I'm running mysql Ver 8.0.13 for osx10.14 on x86_64 (Homebrew) |
MySQL 8.0.4 changed the default password authentication to a new format that's incompatible with previous formats. https://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/ From PHP's PDO docs: From: https://secure.php.net/manual/en/ref.pdo-mysql.php
So you'll either need to:
You'd need to swap out Leaving this for reference as well: laradock/laradock#1392 |
Hi angrybrad Apologies, I'm a github and command line novice. Could you please clarify what you mean for #3 above. I'm using PHP 7.3 so I assume #1 is OK. I've found two instances of my.cnf in /usr/, to which I've added the line in #2 to the bottom. I get to the the point mentioned by jonlivingston above, but don't know what you mean by 'yours' for username and password, as my understanding is these are not needed, well root as username but the password is blank, as part of the setup. Please note that this is a fresh install of Mojave, with the disk wiped. I've tried changing the server to 127.0.0.1, the port to 8889, all the 'fixes' I could find, with no luck. Thanks |
It's OK, I figured this out. I had to first log in to mysql using mysql -u root -p Then create a database user with a password using CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password'; And finally assign all privileges to that user using GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; I was now able to complete the Craft setup. |
Just alter your mysql user and you're good to go:
|
Description
Environment is latest Valet. Fresh install of Craft 3 and Valet (MySQL wasn't upgraded from previous version).
Get this error in both the CLI and browser:
SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
Additional info
The text was updated successfully, but these errors were encountered: