×

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

hqy hqy 发表于2020-05-25 14:00:51 浏览2472 评论0

抢沙发发表评论

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://kinber.cn/post/1291.html 转载需授权!

分享到:


推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

群贤毕至

访客