MySQl報錯之@@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON
今天在一臺MySQL資料庫的SLAVE裡dump出來一個databases的資料,想匯入到另一臺機器的資料庫裡,但是報錯:
-
Warning: Using a password on the command line interface can be insecure.
- ERROR 1839 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON.
報錯原因是原資料庫裡開了gtid,需要在mysqldump語句裡指定--set-gtid-purged=on引數;
難道mysqldump很久才完成的資料,然後scp也花了很長時間到目標機器,發現報這個錯誤就沒辦法了嗎?需要重新mysqldump?
肯定不是了,在匯入的時候加入-f引數即可,例如:
- mysql -uroot -pSunstar2012Hecom888ser8686 -h47.93.xx.xx -f cus_DEMO < /alidata1/backup/gl/gl/cus_DEMO_gl.sql
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/20893244/viewspace-2138125/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAError
- MySQL報錯Table 'plugin' is read only [ERROR] Can't open the mysql.plugin table.MySqlPluginError
- mysql匯入報錯Variable 'sql_notes' can't be set to the value of 'NULL'MySqlNull
- Swift代理報錯Optional can only be applied to members of an @objc protocolSwiftAPPOBJProtocol
- mysql報CanMySql
- 錯誤處理--pure specifier can only be specified for functionsFunction
- mysql遇到Variable can’t be set to the value of ‘NULL’MySqlNull
- AndroidStudio之自定義輸出包名報錯 Cannot set the value of read-only property 'outputFile' forAndroid
- MySQL 報錯'Variable 'XXX' is a read only variable'MySql
- 使用monaco編輯器 報錯Can only have one anonymous define call per script file
- mysql:Variable 'character_set_client' can't be set to the value of 'NULL'解決MySqlclientNull
- Mysql報錯Fatal error:Can't open and lock privilege tablesMySqlError
- 報錯-only final is permittedMIT
- ld: -pie can only be used when targeting iOS 4.2 or later clang: error: linker command failed with eiOSErrorAI
- [mysql] 批量匯入提示: Variable ‘character_set_client’ can’t be set to the value of ‘NULLMySqlclientNull
- MySQL 之 only_full_group_byMySql
- MySQL 建立外來鍵報錯Can't write; duplicate key in tableMySql
- MySQL 5.5 原始碼安裝報錯"[ERROR] Can't start server"MySql原始碼ErrorServer
- mysql 5.7啟動報錯"Expected to open undo tablespaces but was able to find only 0"MySql
- [MONGODB]: WHEN ARBITER REQUIRED FOR REPLICA SETMongoDBUI
- MYSQL報1022錯誤:Can't write;duplicate key in table '.....'MySql
- for public synonym, only sys user can compile it?Compile
- MySQL 5.5 關閉資料庫報錯"Can't connect to local MySQL server through socket"MySql資料庫Server
- Mysql:Variable 'XXXt' can't be set to the value of 'NULL'解決MySqlNull
- React報錯之React.Children.only expected to receive single React element childReact
- mysql 啟動報錯Can't connect to local MySQL server through socket '/data/mysql/mysql/mysql.sock'(111)MySqlServer
- MySQL報錯'ERROR 2002 (HY000): Can't connect to local MySQL server through'MySqlErrorServer
- MySQL sql_mode=only_full_group_by 錯誤MySql
- 踩坑系列:MySql only_full_group_by配置,竟導致所有應用報錯?MySql
- SQL Server 建立使用者賦權報錯之Permissions at the server scope canSQLServer
- eslint --fix 報錯 can't not find modulesEsLint
- MongoDB報錯:"assertion" : "can't map file memory"MongoDB
- mac提交svn提示CHECKOUT can only be performed on a version resourceMacORM
- TypeError: only integer scalar arrays can be converted to a scalar indexErrorIndex
- Android @Field parameters can only be used with form encodingAndroidORMEncoding
- ASM Diskgroup Can Not Be Shown When Creating Database With DBCAASMDatabase
- MySQL 中出現報錯提示: ‘Variable ‘XXX‘ is a read only variable‘的解決方法MySql
- 【報錯】elasticsearch 報錯blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]ElasticsearchBloCORBIndexdeleteAPI