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