mysql server is running with the --skip-grant-tables option
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; 开始只读模式
推荐阅读
-
mysql server is running with the --skip-grant-tables option
-
mysql数据库mysql: [ERROR] unknown option '--skip-grant-tables'
-
The MySQL server is running with the --read-only option so it cannot execute this statement
-
问题:The MySQL server is running with the--skip-grant-tables option
-
mysql server is running with the --skip-grant-tables option
-
mysql数据库mysql: [ERROR] unknown option '--skip-grant-tables'
-
问题:The MySQL server is running with the--skip-grant-tables option
-
ERROR 1290 (HY000): The MySQL server is running with the --s_MySQL
-
The MySQL server is running with the --read-only option so it cannot execute this statement
-
ERROR 1290 (HY000): The MySQL server is running with the --s_MySQL