在网上看到很多方法,可是就是行不通.
数据库的字符集是utf8
mysql -uroot -p --default-character-set=utf8 test2 < d:/dz.sql
它提示:
mysql: Character set 'utf8' is not a compiled character set and is not specified
in the 'C:\mysql\\share\charsets\Index' file
用source
mysql> use forum
Database changed
mysql> source d:/dz.sql
Query OK, 0 rows affected (0.00 sec)
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near 'DEFAULT CHAR
SET=utf8' at line 6
Query OK, 0 rows affected (0.00 sec)
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near 'DEFAULT CHAR
SET=utf8' at line 11