25
2020
05
14:00:51

mysql server is running with the --skip-grant-tables option



推荐点击下面图片,通过本站淘宝优惠价购买:

image.png

mysql server is running with the --skip-grant-tables option


今天在mysql中新建数据库提示The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement,原来是数据中配置的--skip-grant-tables,这样安全就降低了,这个一般当忘记root密码的时候需要这样操作

Query OK, 0 rows affected (0.00 sec)
  
mysql> show variables like '%read_only%';
+------------------+-------+
| Variable_name  | Value |
+------------------+-------+
| innodb_read_only | OFF  |
| read_only    | OFF  |
| tx_read_only   | OFF  |
+------------------+-------+
3 rows in set (0.00 sec)
  
mysql> set global read_only=1;
Query OK, 0 rows affected (0.00 sec)
  
mysql> show variables like '%read_only%';
+------------------+-------+
| Variable_name  | Value |
+------------------+-------+
| innodb_read_only | OFF  |
| read_only    | ON  |
| tx_read_only   | OFF  |
+------------------+-------+
3 rows in set (0.00 sec)

set global read_only=0; 关闭只读,可以读写 set global read_only=1; 开始只读模式


本文链接:https://hqyman.cn/post/1291.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:





休息一下,本站随机推荐观看栏目:


« 上一篇 下一篇 »

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

您的IP地址是: