navicat 提示“1045 access denied for user 'root'@'localhost' ”解决方法
切换到MySQL bin目录下,mysqld --skip_grant_tables;mysql -u root -pwithout password;denglu mysql>update mysql.user set authentication_string=password('root') where user='root';mysql> fl
·
cmd命令行切换到MySQLbin目录下,
mysqld --skip_grant_tables;//跳过权限验证。
登录mysql后
mysql -u root -p; //mysql首次登录默认密码为空。
方法一:
mysql>updatemysql.user set authentication_string=password('root') where user='root';
mysql> flushprivileges;
mysql> quit;
方法二:
登录mysql后,
mysql>alteruser 'root'@'localhost' identified by 'root';
方法三:
登录mysql后
mysql>setpassword for 'root'@'localhost'=password('root');
更多推荐
已为社区贡献1条内容
所有评论(0)