root用户登录mysql后新建用户提示1045错误
2018-01-03 15:47
666 查看
执行以下命令查看root权限
show grants for 'root'@'localhost';
如果没有显示with grant option,说明是root没有拥有新建授权用户的权限(为什么会这样呢,因为我把user='root' and host='localhost'给删掉了,然后重新授权all privileges给新建root用户,但是没有授权with grant option)
然后我们使用localhost登录再次新建root用户,一定要在后面增加with grant option;
grant all privileges on *.* to 'root'@'localhost' identified by '123' with grant option;;现在我们再使用root用户登录就可以正常新建用户了
show grants for 'root'@'localhost';
如果没有显示with grant option,说明是root没有拥有新建授权用户的权限(为什么会这样呢,因为我把user='root' and host='localhost'给删掉了,然后重新授权all privileges给新建root用户,但是没有授权with grant option)
然后我们使用localhost登录再次新建root用户,一定要在后面增加with grant option;
grant all privileges on *.* to 'root'@'localhost' identified by '123' with grant option;;现在我们再使用root用户登录就可以正常新建用户了
相关文章推荐
- mysql报ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password)错误或者远程用户不能登录
- root用户可以通过phpmyadmin登录,普通用户却不行,提示1045的错误
- centos中卸载mysql,Mysql中添加用户之后可能出现登录时提示ERROR 1045 (28000): Access denied for user的错误
- Windows7系统 Navicat连接MySQL提示错误1045 Access denied for user 'root'@'localhost' (using password:YES)
- 新装MySql后登录出现root帐号提示mysql ERROR 1045 (28000): Access denied for use的解决办法
- mysql 以某用户登录错误 ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)
- SQL Server2005用新建用户名登录提示“该用户与可信 SQL Server 连接无关联” 以及SQL Server2005常见错误及解决方案
- 解决MySql登录错误ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- 解决Linux系统安装后,root用户无法登录,提示“无法验证用户”的错误问题
- CentOS命令登录MySQL时,报错ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)错误解决方法
- MySQL允许root帐号远程登录 错误1045
- 新装mysql后登录出现root帐号提示mysql ERROR 1045 (28000): Access denied for use
- 关于MySql登录出现错误代码 1045 Access denied for user 'root'@'localhost' (using password:YES)
- CentOS命令登录MySQL时,报错ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)错误解
- mysql远程登录 错误2003 及root用户授权访问方法(树莓派装MySQL)
- 解决linux下mysql登录提示1045错误
- 解决Navicat for MySQL打开连接时出现错误提示1045 access denied for user 'root'@'localhost' (using password yes)的问题
- 【mysql】linux用yum安装mysql后,登陆root用户提示ERROR 1045 (28000): Access denied for user 'root'@'localhost' (..
- mysql新建用户,登录错误
- SQL Server2005用新建用户名登录提示“该用户与可信 SQL Server 连接无关联” 以及SQL Server2005常见错误及解决方案