Mac下mysql修改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 'password('123456')' at line 1

亲测用以下方法有效:

alter user 'root'@'localhost' identified by '新密码';

 

posted @ 2021-12-31 17:24  バカなの  阅读(46)  评论(0编辑  收藏  举报