Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if the MySQL5.6.x sha256_password plugin logs in to the user Times if it is wrong?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

MySQL5.6.x sha256_password plug-in login user Times what to do wrong, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.

[problem description]:

Version: Oracle MySQL 5.6.30

Add default-authentication-plugin=sha256_password startup parameters to start the database:

Mysqld_safe-- default-authentication-plugin=sha256_password &

Or set default-authentication-plugin=sha256_password in [mysqld] and start the database.

Check the old_passwords options:

Mysql > SELECT @ @ old_passwords

+-+

| | @ @ old_passwords |

+-+

| | 0 |

+-+

1 row in set (0.00 sec)

Create a test user and refresh the authorization table:

Mysql > CREATE USER aa@localhost IDENTIFIED BY 'aa'

Query OK, 0 rows affected (0.01 sec)

Mysql > FLUSH PRIVILEGES

Query OK, 0 rows affected (0.00 sec)

Log out and try to log in through the newly created user:

[root@sAno1y] # mysql-uaa-paa

Warning: Using a password on the command line interface can be insecure.

ERROR 2061 (HY000): Authentication plugin 'sha256_password' reported error: Authentication requires SSL encryption

Close the instance and restart without this parameter:

Mysqld_safe &

Or delete / comment out the default-authentication-plugin=sha256_password option in [mysqld] and start the database.

Continue to try to log in:

[root@sAno1y ~] # mysqld_safe &

[1] 14052

[root@sAno1y ~] # 160818 11:54:08 mysqld_safe Logging to'/ data/mysql_log/err-log.err'.

160818 11:54:08 mysqld_safe Starting mysqld daemon with databases from / data/mysql

[root@sAno1y] # mysql-uaa-paa

Warning: Using a password on the command line interface can be insecure.

ERROR 2061 (HY000): Authentication plugin 'sha256_password' reported error: Authentication requires SSL encryption

Continue to report the same mistake.

[solution]:

Find a post like this in https://bugs.mysql.com/:

Https://bugs.mysql.com/bug.php?id=68478

At present, the Status of the "bug" has been set to: Closed

The post was a comment from a guy named "Paul Dubois" who said that this is not a bug, because bug submitters, like me, need to connect through SSL when using the plug-in:

"Use of the sha256_password plugin requires that MySQL be built with SSL capabilities. See Section 6.3.9," Using SSL for Secure Connections ".

On the contrary: if you use the plug-in and set the password in old_passwords=0, why bother to use the plug-in?

Disable the plug-in and recreate the user@ip you need to create to resolve the problem.

The premise is that other user passwords are not created through old_passwords=2.

After reading the above, have you mastered how the MySQL5.6.x sha256_password plugin logs in to the user Times to do something wrong? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report