Home > Database > navicat > body text

How to export the entire database using navicat

王林
Release: 2021-01-07 11:42:55
forward
10174 people have browsed it

How to export the entire database using navicat

First of all, we need to make it clear that when navicat exports the database by transferring it to a SQL file, if there are foreign keys, it will cause an error during import, so we need to use data transfer. way to export.

(Learning video sharing: Programming video)

How to export the entire database using navicat

Select to use the file method to save

How to export the entire database using navicat

Advanced options need to be selected as

How to export the entire database using navicat

The exported SQL script is the complete version, and no error will be reported when imported into a new database. .

*If an import error occurs: [Err] 1067 - Invalid default value for 'search_time' The reason for the error means: there is a STRICT mode (strict mode) in mysql5.7 version, and in this mode By default, it is not allowed to set the date value to all 0 values, so if you want to solve this problem, you need to modify the value of sql_mode.

Solution:

mysql> select @@sql_mode;
mysql> set sql_mode=(select replace(@@sql_mode,'NO_ZERO_IN_DATE,NO_ZERO_DATE',''));
Copy after login

It is useless to change it here because you need to change the global parameters.

mysql> set @@global.sql_mode=(select replace(@@global.sql_mode,'NO_ZERO_IN_DATE,NO_ZERO_DATE',''));
mysql> select @@global.sql_mode;
Copy after login

Just import it again.

Related recommendations: navicat for mysql graphic tutorial

The above is the detailed content of How to export the entire database using navicat. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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