When importing low version database data into high version database, the following problems are caused by different password formats:
[root@localhost~]#mysql-uroot-p
Enterpassword:
ERROR2049(HY000):Connectionusingold(pre-4.1.1)authenticationprotocolrefused(clientoption'secure_auth'enabled)
View help
[root@localhostmysql]#mysql--help|grep'secure-auth'
--secure-authRefuseclientconnectingtoserverifitusesold
(Defaultstoon;use--skip-secure-authtodisable.)
Still failed
[root@localhost~]#mysql-uroot-p--secure-auth=off
Enterpassword:
ERROR1275(HY000):Serverisrunningin--secure-authmode,but'root'@'localhost'hasapasswordintheoldformat;pleasechangethepasswordtothenewformat。
The final solution
[root@localhostmysql]#vim/etc/my.cnf
[mysqld]
secure_auth=off
Then Restart Database
[root@localhost~]#mysql-uroot-p--secure-auth=off
Enterpassword:
WelcometotheMySQLmonitor.Commandsendwith;or\g.
YourMySQLconnectionidis5
Serverversion:5.6.28-76.1-logPerconaServer(GPL),Release76.1,Revision5759e76
Copyright(c)2009-2015PerconaLLCand/oritsaffiliates
Copyright(c)2000,2015,Oracleand/oritsaffiliates.Allrightsreserved.
OracleisaregisteredtrademarkofOracleCorporationand/orits
affiliates.Othernamesmaybetrademarksoftheirrespective
owners.
Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.
root@localhost11:31:[(none)]>
Update password format
root@localhost11:31:[(none)]>updatemysql.usersetpassword=password('xxxxxx')whereuser='root'andhost='localhost';
root@localhost11:36:[(none)]>flushprivileges;
Delete secure after modification_ Auth = off parameter, restart the database
Similar Posts:
- MYSQL Ignoring query to other database [How to Solve]
- [How to Solve ]Error 1130 (HY000) of MySQL authorized connection
- mysql ERROR 1044 (42000): Access denied for user ‘
- [Solved] MYSQL ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot e…
- ERROR 1040 (08004): Too many connections
- [Solved] Error 1054 (42s22) unknown column ‘password’ in ‘field list’ when updating the password of mysql5.7 or above
- Mysqldump backup problems got error: 1045, error 1045 (28000), got error: 1449
- MYSQL Login Error: mysqladmin: connect to server at ‘localhost’ failed
- [How to Solve] nodejs mysql ER_NOT_SUPPORTED_AUTH_MODE
- [Solved] Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by serv