Home > Database > Mysql Tutorial > Solution to error 1840 in mysql

Solution to error 1840 in mysql

零下一度
Release: 2017-06-29 10:43:22
Original
6313 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template