我现在用的mysql,想把服务器上的数据库导入到本地,在服务器上导出了个test.sql文件,现在想把test.sql文件导入到本地数据库中,可是总报错,因为现在数据比较大了,用命令行提示的错误:如下
mysql> source c:/tomentor20090111.sql
Query OK, 0 rows affected (0.00 sec)Query OK, 0 rows affected (0.00 sec)Query OK, 0 rows affected, 1 warning (0.00 sec)Database changed
Query OK, 0 rows affected (0.00 sec)Query OK, 0 rows affected (0.00 sec)Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\copy_of_tm_message.frm' (errn
o: 121)
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\huodongtemp.frm' (errno: 121)ERROR 1146 (42S02): Table 'tomentor.huodongtemp' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_announcement.frm' (errno:
121)
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_answer.frm' (errno: 121)
ERROR 1146 (42S02): Table 'tomentor.tm_answer' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_article.frm' (errno: 121)
ERROR 1146 (42S02): Table 'tomentor.tm_article' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_baoming.frm' (errno: 121)
ERROR 1146 (42S02): Table 'tomentor.tm_baoming' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_base.frm' (errno: 121)
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_blog.frm' (errno: 121)
ERROR 1146 (42S02): Table 'tomentor.tm_blog' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)
。因为过长只贴一部分。请各位帮帮小弟,很急,在不好就挨批了
mysql> source c:/tomentor20090111.sql
Query OK, 0 rows affected (0.00 sec)Query OK, 0 rows affected (0.00 sec)Query OK, 0 rows affected, 1 warning (0.00 sec)Database changed
Query OK, 0 rows affected (0.00 sec)Query OK, 0 rows affected (0.00 sec)Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\copy_of_tm_message.frm' (errn
o: 121)
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\huodongtemp.frm' (errno: 121)ERROR 1146 (42S02): Table 'tomentor.huodongtemp' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_announcement.frm' (errno:
121)
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_answer.frm' (errno: 121)
ERROR 1146 (42S02): Table 'tomentor.tm_answer' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_article.frm' (errno: 121)
ERROR 1146 (42S02): Table 'tomentor.tm_article' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_baoming.frm' (errno: 121)
ERROR 1146 (42S02): Table 'tomentor.tm_baoming' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_base.frm' (errno: 121)
Query OK, 0 rows affected, 1 warning (0.00 sec)ERROR 1005 (HY000): Can't create table '.\tomentor\tm_blog.frm' (errno: 121)
ERROR 1146 (42S02): Table 'tomentor.tm_blog' doesn't exist
Query OK, 0 rows affected, 1 warning (0.00 sec)
。因为过长只贴一部分。请各位帮帮小弟,很急,在不好就挨批了
o: 121)
应该是某个表没办法建立,估计和外键有关。 外键所参照的表还未建立就先建本表了。
把SQL内容自己编辑一下看看。
你不贴出你的SQL语句。我只能猜。没办法告诉你怎么办。
问题说明越详细,回答也会越准确!参见如何提问。(提问的智慧)