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
It seems that MYSQL is still running in the -- skip-grant-tables mode. How can I bring MYSQL back to the original mode?
Method 1: skip-grant-tables was originally configured in the mysql. ini file, followed by # comment out.
Modify the mysql configuration fileskip-grant-tables
After removal, restart mysql
Second:
The MySQL server is running with the -- skip-grant-tables option so it cannot execute this statement
Solution:
Mysql> set global read_only = 0;
(Disable the read-only attribute of the new master database)
Flush privileges;
Set global read_only = 1; (read/write attribute)
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 ';
Explanation:
Set global read_only = 0; Disable read-only and read/write
Set global read_only = 1; Start read-only mode
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; Disable read-only and can read and write set global read_only = 1; Start read-only mode