新初始化登陆后,执行show databases 提示:
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
执行 set password for root@localhost = password('root');
有如下报错:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'database' at line 1
改用: alter user root set pawwsord=PASSWORD('root123456');有另一个报错:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set pawwsord=PASSWORD('root123456')' at line 1
改用:alter user 'root'@'localhost' identified by 'root123456';
执行成功。