Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[转换] 请问一下, 如何把.sql文件导入mysql

[复制链接]
Aoron 发表于 2007-3-31 01:21:38 | 显示全部楼层 |阅读模式
在网上看到很多方法,可是就是行不通.
数据库的字符集是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


请问如何解决?
回复

使用道具 举报

王者8 发表于 2007-3-31 13:22:59 | 显示全部楼层
呵呵。。。。。。
。。。。。
回复

使用道具 举报

紫琼 发表于 2007-4-2 10:59:08 | 显示全部楼层

回复 #1 Aoron 的帖子

可以参考这里的方法:https://discuz.dismall.com/usersguide/advanced_mysql.htm  :)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-12 02:06 , Processed in 0.125660 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表