mysql错误:The MySQL server is running with the

阅读: 评论:0

mysql错误:The MySQL server is running with the

mysql错误:The MySQL server is running with the

本文为大家讲解的是mysql错误:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement解决方法,感兴趣的同学参考下。

在创建用户给用户赋权限的时候出现以下错误:

错误描述:

mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

解决方法:

先刷新一下权限表,把在所有数据库的所有表的所有权限赋值给位于所有IP地址的root用户。

mysql> flush privileges;

Query OK, 0 rows affected (0.01 sec)

再去执行给用户赋值操作,就成功了

mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';

Query OK, 0 rows affected (0.00 sec)

关于远程连接设置

把在所有数据库的所有表的所有权限赋值给位于所有IP地址的root用户。

mysql> grant all privileges on *.* to root@'%'identified by 'password';

如果是新用户而不是root,则要先新建用户

mysql>create user 'username'@'%' identified by 'password';  

此时就可以进行远程连接了。

本文发布于:2024-02-03 00:18:44,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170689072447412.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:错误   mysql   MySQL   running   server
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23