MySQL Run SQL file error incorrect table Definition;there can be is only one TIMESTAMP column with Current_timestamp in DEFAULT or on U PDATE clause

Source: Internet
Author: User
Tags table definition

Problem description

You want to down the database from the server. Operation: First dump the database into a SQL file, and then run the SQL file locally using Navicate, an error message appears:

inch DEFAULT or on UPDATE clause

Solution Ideas

Reference:

Http://www.cnblogs.com/joeylee/p/3877578.html

Cause: In timestamp, there are two timestamp fields in a table that are not supported in the low version.

Solution:

1, select version (); View which SQL version is used on the server. Sync to Local.

2. Uninstall MySQL (originally installed MySQL 5.5--->mysql 5.6)

I. Uninstall MySQL using the install and uninstall application. (Requires shutdown restart)

Ii.cmd->services.msc Open the service and see the MySQL service name is still there.

CMD->SC Delete MySQL (the service name to be removed)

3. Install MySQL

I. Download MySQL 5.6-64x.zip, unzip it and put it in the corresponding location * *. Download location: http://pan.baidu.com/s/1kVvYtIf

II. Configuring the PATH environment variable

**/bin Configuration to Path

Find My_default.ini under the * * path or create a new My.ini

Enter or change

[Mydqld]

Basedir = * *

Datadir= **\data

4. Start MySQL

I.CMD->CD **\bin->mysqld--install

II. Continue to enter net start MySQL after success

5. Log in to MySQL

I.CMD->CD **\bin->mysql-u Root-p

II. First login without password direct login successful

III. Change the root password

Use MySQL;

Update user set Password=password ("New_pass") where user= "root";

Flush privileges;

Exit

6. You want to change the root password already exists

I.my.ini (if not, can be in My_default.ini)

[Mysqld]

#跳过密码验证

#skip-name-resolve

II. Then enter mysql-uroot directly in CMD to log in directly to perform the third item in the previous step.

7, after the successful login, the synchronization will not occur after the problem.

            

        

      

MySQL Run SQL file error incorrect table Definition;there can be is only one TIMESTAMP column with Current_timestamp in DEFAULT or on U PDATE clause

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.