Home > Database > navicat > body text

How to solve the error when navicat imports sql

爱喝马黛茶的安东尼
Release: 2019-08-17 13:04:54
Original
9719 people have browsed it

How to solve the error when navicat imports sql

Scenario: Importing more than 100M sql files into the local database and error reporting, local environment, phpstudy, error reporting one: 1294 - Invalid ON UPDATE clause for 'create_time' column, error reporting two: 2006 - MySQL server has gone away.

Related recommendations: "Navicat for mysql graphic tutorial"

Error one reason: phpstyudy's mysql version is too low, the default is 5.5

Solution: Upgrade the mysql version

1. Back up the current database data. You can export the database file as a backup.

2. Back up the MySQL folder under PhpStudy in case the upgrade fails. You can also use an older version of the database.

3. Download MySQL5.6, unzip it, and place it in the MySQL folder under PhpStudy.

4. Copy a copy of my-default.ini, rename it to my.ini, open my.ini and add:

basedir="E:/phpStudy/MySQL/"
datadir="E:/phpStudy/MySQL/data/"
Copy after login

. Change these two addresses to your own. The mysql directory and database directory in phpstudy.

5. Then run cmd as an administrator and enter the MySQL directory. As shown in the figure, it indicates success. The execution is as follows:

How to solve the error when navicat imports sql

Error Second reason: Exceeding the maximum data packet allowed by mysql

Solution:

Add to my.ini (parameters are based on your own needs)

max_allowed_packet=500M

wait_timeout=288000

interactive_timeout = 288000

The above is the detailed content of How to solve the error when navicat imports sql. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!