mysqlserverisrunningwiththe--skip-grant-tablesoption

生命价值不在于获取多少,生命价值在于付出多少。有钱的人更有钱,这往往是一种必然。

The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
意思貌似MYSQL还运行在 --skip-grant-tables模式,如何让他回到原来的模式

第一种方法:原来在mysql.ini文件中配置了skip-grant-tables,前面加个#注释掉就可以了

修改mysql的配置文件,把skip-grant-tables去掉后,重启mysql

第二种:

The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

解决办法:

mysql> set global read_only=0;
(关掉新主库的只读属性)

flush privileges;

set global read_only=1;(读写属性)

flush privileges;

Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

mysql> SET SESSION binlog_format = 'ROW';
mysql> SET GLOBAL binlog_format = 'ROW';

解释:

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

mysql> set global read_only=0; 
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; 开始只读模式

以上就是mysqlserverisrunningwiththe--skip-grant-tablesoption。我想做一个贪财好色的小女子,以后不用谁喜欢谁不喜欢了,余生我只想拥有美貌,做个俗人,肤浅又快乐。更多关于mysqlserverisrunningwiththe--skip-grant-tablesoption请关注haodaima.com其它相关文章!

您可能有感兴趣的文章
MySQL性能参数详解之Skip-External-Locking参数介绍

一篇关于skip_name_resolve参数的总结分享

MySQLskip-character-set-client-handshake导致的一个字符集问题

MysqlDNS反向解析导致连接超时过程分析(skip-name-resolve)

远程连接mysql数据库注意事项记录(远程连接慢skip-name-resolve)