[root@node1 db]# mysql
ERROR 1045 (28000): Unknown error 1045
[root@node1 db]# vim /etc/my.cnf #使用完後去掉
[mysqld]
skip-grant-tables=1
重啓mysql,再修改
[root@node1 db]# systemctl restart mysqld
[root@node1 db]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.22 MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> set password = PASSWORD( 'Reid4909@%&' );
ERROR 1290 (HY000): Unknown error 1290
mysql> ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'Tom579#$%^&' ;
ERROR 1290 (HY000): Unknown error 1290
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> set password = PASSWORD( 'Reid4909@%&' );
ERROR 1133 (42000):
mysql> ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'Tom579#$%^&' ;
Query OK, 0 rows affected (0.01 sec)
mysql> set password for root@localhost = password( '123456' );
Query OK, 0 rows affected, 1 warning (0.00 sec)
|