-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Mysql. The server requested authentication method unknown to the client [caching_sha2_password] #1390
Comments
Root causehttps://mysqlserverteam.com/mysql-8-0-4-new-default-authentication-plugin-caching_sha2_password/ Corrective actionDowngrade mysql version |
Don't uninstall MySQL latest version. Rather follow these steps https://gist.github.com/benlinton/d24471729ed6c2ace731 |
If you want to use mysql 8 with native password (the old way) you can follow the following steps: Add this to my.cnf in laradock\mysql\my.cnf under [mysqld]: |
|
alter user 'username'@'localhost' identified with mysql_native_password by 'password'; |
Hi Mr. Ailionx and Mr. Najamalvi, |
Don't uninstall MySQL 8. Sign into mysql using a terminal program: This does the trick. |
work for me, thank you! |
It also work for me. Many many thanks for you. Have a nice day!!!
…On Sat, Oct 27, 2018 at 9:55 AM William Alexander ***@***.***> wrote:
alter user 'username'@'localhost' identified with mysql_native_password
by 'password'; would fix it.
work for me, thank you!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1390 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AqZUP-QX0NTNn9J98RuhesSqjAuiuGnWks5uo8s6gaJpZM4SQ5gP>
.
|
added these lines in docker-compose.yml fixed my issue: mysql:
image: mysql:8
command: ['--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci','--default-authentication-plugin=mysql_native_password'] |
Basic PDO user with a possible solution. You do not have to uninstall MySQL 8.x or even do the above (maybe... I'm not using Laradock). You just need to go to your MySQL installer, reconfigure your server, and select Legacy Authentication Method (which retains MySQL 5.x compatibility). I figured this out through trial and error after my dsn in my PDO didn't allow me to connect. Finding the Installer in Windows |
you saved my life. |
if external/remote use replace 'localhost' to '%' |
The latest version of mysql :
|
You just saved my life @zacksleo, Thanks. Installing latest drupal 8.6.4 with MySQL 8.0.13 both via docker. |
Just in case someone else is using laradock too, by "clear the data-folder" I guess is:
|
I'm using windows and I don't know which terminal program I should use for this. I really need help on this. |
thanks a lot for your work around and it worked for me! :) |
this really helped me |
just remove damn mysql and use mariadb 10.x as main database, it works fine. |
alter user 'username'@'localhost' identified with mysql_native_password by 'password'; This one helps me. Thank you! |
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'rootpassword'; login through command line, it works after that |
Access denied for user 'root'@'localhost' (using password: YES) i have already used ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'rootpassword'; what to do now?? |
@thicolares Thanks so much. You save my life. |
well done! thanks |
if you use mysql latest version in docker container, you can type this command into docker-compose.yaml command: --default-authentication-plugin=mysql_native_password
or use oldest version mysql.` |
This worked for me on CentosOS.
|
This works very well for me :D |
Its work for me !!! |
This worked for me. Thank you |
And actually with
|
This worked for me. Thank You. |
This really helps me fix my problem! Thanks for sharing!!! |
For Mac users, just go to System Preference, MySql panel, initialize Database, if use "strong password encryption" is selected choose "Use Legacy Password encryption", insert the root password and then click ok. It will require your pc password. Thats all. |
or You can follow this video if you want or reset mysql password |
That works for me as well!! Thanks brow! |
if you are facing "caching_sha2_password" error during connectivity of your mysql database using python , |
You can also fix this issue using phpmyadmin: |
Amazing😄 |
Add following line under
|
thank you...it worked for me |
It's work for me too !! |
Thanks to tell the root of the problem :) |
Thankyou so much <3 |
Changing Auth Method for User didn't worked for me, but changing standard Auth method of MySQL 8 - did. Add lines: At the end of: |
if you are using Mysql 8.0.+ on Mac, Uninstall Mysql from system preferences |
Worked for me with this https://stackoverflow.com/a/55235533/13922206 |
in mysql 8.4
|
You saved me, thanks!! Im running mysql on server and i need to add this variables manually, but is easy: you need to find your my.cnf and edit
Add these lines on the end:
Save and restart the service:
|
Info:
Issue:
New fresh laradock installation. All default settings. Driver is shared.
Except:
Can't connect to the mysql from phpMyAdmin.
#2054 - The server requested authentication method unknown to the client
mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]
mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client
But I can connect to mysql inside mysql container with standard root/root credentials.
I tried to delete all containers and images. Several times downloaded laradock. Tried to reinstall Docker. No success.
Expected behavior:
Can connect to mysql with phpMyAdmin
Logs
The text was updated successfully, but these errors were encountered: