Home  >  Article  >  Database  >  Solution to error 1840 in mysql

Solution to error 1840 in mysql

零下一度
零下一度Original
2017-06-29 10:43:226189browse

1. Phenomenon

When mysql uses a sql file to import the database, it prompts ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty.

Note: The mysql database has just been installed, and master-slave replication has never been configured, nor has master-slave replication of GTID been configured.

 

2. Solution

After consulting the online information, after testing, I found that the following method can solve my problem

Enter mysql Mode, reset master

 # mysql -u root -p

 Enter password

 mysql> reset master;

 

After exiting, re-import, OK. Just let the machine import the data by itself.

 

The above is the detailed content of Solution to error 1840 in mysql. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn