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;
(關(guān)掉新主庫的只讀屬性)
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; 關(guān)閉只讀,可以讀寫
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; 關(guān)閉只讀,可以讀寫 set global read_only=1; 開始只讀模式
- The MySQL server is running with the --read-only option so it cannot execute this statement
- mysql數(shù)據(jù)庫mysql: [ERROR] unknown option ''--skip-grant-tables''
- mysql視圖之確保視圖的一致性(with check option)操作詳解
- MySQL存儲表情時報錯:java.sql.SQLException: Incorrect string value:‘\xF0\x9F\x92\xA9\x0D\x0A...’的解決方法
- Mysql中的NULL和Empty String
- javascript連接mysql與php通過odbc連接任意數(shù)據(jù)庫的實例
- ubuntu下apt-get安裝和徹底卸載mysql詳解
- MySQL利用AES_ENCRYPT()與AES_DECRYPT()加解密的正確方法示例
- 利用pt-heartbeat監(jiān)控MySQL的復(fù)制延遲詳解
- MySQL pt-slave-restart工具的使用簡介
相關(guān)文章
mysql全連接和oracle全連接查詢、區(qū)別及說明
這篇文章主要介紹了mysql全連接和oracle全連接查詢、區(qū)別及說明,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2023-03-03
MySql Installer 8.0.18可視化安裝教程圖文詳解
這篇文章主要介紹了MySql Installer 8.0.18可視化安裝教程,本文圖文并茂給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友可以參考下2019-12-12
mysql如何查詢當(dāng)前數(shù)據(jù)庫中不為空的表
這篇文章主要介紹了mysql如何查詢當(dāng)前數(shù)據(jù)庫中不為空的表問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2023-10-10

