《Mysql學習mysql server is running with the --skip-grant-tables option》要點:
本文介紹了Mysql學習mysql server is running with the --skip-grant-tables option,希望對您有用。如果有疑問,可以聯(lián)系我們。
MYSQL學習The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
意思貌似MYSQL還運行在 --skip-grant-tables模式,如何讓他回到原來的模式
MYSQL學習第一種方法:原來在mysql.ini文件中配置了skip-grant-tables,前面加個#注釋掉就可以了
MYSQL學習修改mysql的配置文件,把skip-grant-tables
去掉后,重啟mysql
MYSQL學習第二種:
MYSQL學習The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
MYSQL學習解決辦法:
MYSQL學習mysql> set global read_only=0;
(關掉新主庫的只讀屬性)
MYSQL學習flush privileges;
MYSQL學習set global read_only=1;(讀寫屬性)
MYSQL學習flush privileges;
MYSQL學習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學習mysql> SET SESSION binlog_format = 'ROW';
mysql> SET GLOBAL binlog_format = 'ROW';
MYSQL學習解釋:
MYSQL學習set global read_only=0; 關閉只讀,可以讀寫
set global read_only=1; 開始只讀模式
MYSQL學習
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)
MYSQL學習set global read_only=0; 關閉只讀,可以讀寫 set global read_only=1; 開始只讀模式
轉載請注明本頁網(wǎng)址:
http://www.snjht.com/jiaocheng/5505.html