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密码的时候需要这样操作
mportant; padding: 0px 1em !important; outline: 0px !important; word-break: break-all !important; border-radius: 0px !important; background: none rgb(252, 252, 252) !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; overflow: visible !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;">
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://www.kinber.cn/post/1291.html 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝: