ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

新手mac上安装mysql 后重启系统可能会碰到下面的错误:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

说明你的root权限不够,就可以参考上面的步骤设置权限

Access denied; you need (at least one of) the SUPER privilege(s) for this operation

说明你的root权限不够,就可以参考上面的步骤设置权限

猛一看,怎么是密码错误,其实并不是,是因为mysql检查权限登陆,root权限不够

sudo /usr/local/mysql/support-files/mysql.server stop  或者在系统偏好里有个MySQL里关闭服务

cd    /usr/local/mysql/bin   (进入目录)

sudo su   (获取权限)

./mysqld_safe --skip-grant-tables & (重启服务器)

control+D   (退出当前编辑模式)

你可能感兴趣的:(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES))