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還運(yùn)行在 --skip-grant-tables模式,如何讓他回到原來(lái)的模式
第一種方法:原來(lái)在mysql.ini文件中配置了skip-grant-tables,前面加個(gè)#注釋掉就可以了
修改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)掉新主庫(kù)的只讀屬性)
flush privileges;
set global read_only=1;(讀寫(xiě)屬性)
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';
解釋?zhuān)?/strong>
set global read_only=0; 關(guān)閉只讀,可以讀寫(xiě)
set global read_only=1; 開(kāi)始只讀模式
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)閉只讀,可以讀寫(xiě) set global read_only=1; 開(kāi)始只讀模式
- The MySQL server is running with the --read-only option so it cannot execute this statement
- mysql數(shù)據(jù)庫(kù)mysql: [ERROR] unknown option ''--skip-grant-tables''
- mysql視圖之確保視圖的一致性(with check option)操作詳解
- MySQL存儲(chǔ)表情時(shí)報(bào)錯(cuò):java.sql.SQLException: Incorrect string value:‘\xF0\x9F\x92\xA9\x0D\x0A...’的解決方法
- Mysql中的NULL和Empty String
- javascript連接mysql與php通過(guò)odbc連接任意數(shù)據(jù)庫(kù)的實(shí)例
- ubuntu下apt-get安裝和徹底卸載mysql詳解
- MySQL利用AES_ENCRYPT()與AES_DECRYPT()加解密的正確方法示例
- 利用pt-heartbeat監(jiān)控MySQL的復(fù)制延遲詳解
- MySQL pt-slave-restart工具的使用簡(jiǎn)介
相關(guān)文章
mysql慢查詢(xún)操作實(shí)例分析【開(kāi)啟、測(cè)試、確認(rèn)等】
這篇文章主要介紹了mysql慢查詢(xún)操作,結(jié)合實(shí)例形式分析了mysql慢查詢(xún)操作中的開(kāi)啟、測(cè)試、確認(rèn)等實(shí)現(xiàn)方法及相關(guān)操作技巧,需要的朋友可以參考下2019-12-12DDL數(shù)據(jù)庫(kù)與表的創(chuàng)建和管理深入講解使用教程
這篇文章主要介紹了DDL數(shù)據(jù)庫(kù)與表的創(chuàng)建和管理,系統(tǒng)架構(gòu)的層面來(lái)看,數(shù)據(jù)庫(kù)從大到小依次是數(shù)據(jù)庫(kù)服務(wù)器(上面安裝了DBMS和數(shù)據(jù)庫(kù))、數(shù)據(jù)庫(kù)(也稱(chēng)database或者schema)、數(shù)據(jù)表、數(shù)據(jù)表的行與列2023-04-04使用MySQL生成最近24小時(shí)整點(diǎn)時(shí)間臨時(shí)表
MySQL臨時(shí)表是一種只存在于當(dāng)前數(shù)據(jù)庫(kù)連接或會(huì)話期間的表,它們可以被用來(lái)存儲(chǔ)臨時(shí)數(shù)據(jù),這些數(shù)據(jù)可以在查詢(xún)中被使用,但是它們不會(huì)在數(shù)據(jù)庫(kù)中永久存儲(chǔ),這篇文章主要給大家介紹了關(guān)于如何使用MySQL生成最近24小時(shí)整點(diǎn)時(shí)間臨時(shí)表的相關(guān)資料,需要的朋友可以參考下2024-01-01Mysql添加用戶和設(shè)置權(quán)限的操作方法
這篇文章主要介紹了Mysql添加用戶和設(shè)置權(quán)限的操作方法,主要包括管理用戶,權(quán)限控制的相關(guān)知識(shí),本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2022-07-07