[mysql]mysql8修改root密码
时间: 2019-11-04来源:OSCHINA
前景提要
【围观】麒麟芯片遭打压成绝版,华为亿元投入又砸向了哪里?>>> use mysql select * from user where user='root'; update user set password=password('mysql@2020') where user='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 '('mysql@2020') where user='root'' at line 1 解决: 在MySQL 8.04前,执行:SET PASSWORD=PASSWORD('[新密码]');但是MySQL8.0.4开始,这样默认是不行的。因为之前,MySQL的密码认证插件是“mysql_native_password”,而现在使用的是“caching_sha2_password”。 alter user 'root'@'localhost'identified with mysql_native_password by 'root'; flush privileges; https://blog.csdn.net/u012232730/article/details/82417245 alter user 'root'@'localhost'identified with mysql_native_password by 'mysql@2020'; alter user 'root'@'%'identified with mysql_native_password by 'mysql@2020'; 也有文章说不用flush 成功!不用flush。 改完不重启mycat没事 重启就不行了。 mysql> select count(*) from td_b_nodecode; ERROR 1184 (HY000): Invalid DataSource:0

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行