问题遇到的现象和发生背景
在CentOS7 上安装MYSql 8.0.29 第一次登陆修改初始密码时报错
问题相关代码,请勿粘贴截图
mysql> alter user 'root'@'localhost' indentified by 'New123!';
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 'indentified by 'New123!'' at line 1
mysql> flush privileges;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> alter user 'root'@'localhost' indentified by 'New123!';
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 'indentified by 'New123!'' at line 1
运行结果及报错内容
我的解答思路和尝试过的方法
看到一个帖子说先用 flush privileges; 再修改。我输入flush privileges;敲回车直接报错,先让我修改密码,感觉陷入了怪圈。
我想要达到的结果
现在进入MySQL还是用的初始密码,太难记了,想改成简单点的