记录--连接mysql报错出现安装后输入密码报错但是直接无密码可以进入的问题

第一步 前期的步骤参考
https://blog.csdn.net/chen97_08/article/details/81484286?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param

第二
第7步出现问题,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 ‘(‘root’) where user=‘root’’ at line 1。 解决方法:把文中的【7、输入命令:update mysql.user set authentication_string=password(‘root’) where user=‘root’ ;】 改成:【ALTER user ‘root’@‘localhost’ IDENTIFIED BY ‘123456’;】就可以了。其中DENTIFIED BY ‘123456’[‘123456’]是自己设置的密码

成功,侵删

你可能感兴趣的:(数据库笔记,mysql)