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 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝:

支付宝微信扫一扫,打赏作者吧~
