When you use SQLyog to export a dedecms database as a xxx.sql file, several errors are reported:
Error 1064 online 21: You have an error in your SQL syntax. Check manual t hat corresponds to your MySQL server version for correct syntax, use near ' DEFAULT Charset=utf8 online
The first is a USING btree error. You have a error in your SQL syntax; Check the
Manual that corresponds to your MySQL server version for the right syntax to use
Near ' using Btree,unique KEY ' Pkey ' (' Pkey ') USING btree ...
Solution:
The code is as follows |
Copy Code |
UNIQUE KEY ' Pkey ' ("Pkey") USING Btree, modified to The UNIQUE KEY ' Pkey ' USING btree ("Pkey"), |
The using Btree is placed in front of the index field.
Second, some of the fields in the dedecms with the MySQL system to retain the field conflict, and SQLyog exported data SQL file SQL statements in the Insert field has no symbol "'", so will conflict.
Select a database within phpMyAdmin and browse its table list to see the collation (collation) information of the table. For example, the collation information for a database table is gbk_chinese_ci, so before you export the database as a SQL script, select "Chinese-chinese simplified" in the phpMyAdmin Home language (language) column. Do not choose "Chinese-chinese simplified-gb2312", otherwise the exported SQL file in Chinese will appear garbled phenomenon. This sentence is absolutely the key, I just follow this and then OK.
Similarly, the table's collation information is gb2312_chinese_ci, so before you export the database to SQL script, in the phpMyAdmin home page language (language) column select "Chinese-chinese simplified-gb2312 ", so that the exported SQL script Chinese will not appear garbled.
When importing the above exported SQL script, enter the phpMyAdmin home page to see the "MySQL Character set" information, such as "UTF-8 Unicode (UTF8)", the "file's character Set" select "UTF8" when importing the aforementioned SQL script.
If it is dedecms, direct data import can be exported directly using DEDEDMS