在MySQL5权威指南(第3版),人民邮电出版社。63页看到:>mysql [options] databasename <file.sql我在命令上输入情况:mysql>mysql test_natures < F:/tablecreate.sql;提示如下:ERROR 1064(42000):you have an error in your SQL syntax;check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql test_natures < F:/tablecreate.sql' at line 1搞不懂怎么回事。另外,当前是用root用户使用test_natures数据库。

解决方案 »

  1.   

    mysql test_natures < F:\tablecreate.sql;
      

  2.   


    试了,这样不成,而且貌似MySQL把\t当作了一个转义字符,从提示里可以看出来: < F:ablecreate.sql' at line 1
    。Outfile disabled.ERROR 1064(42000):you have an error in your SQL syntax;check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql test_natures < F:ablecreate.sql' at line 1还需要其他的参数??搞不明白
      

  3.   

    不是在MYSQL命令中,而是在操作系统命令中。C:\Program Files\MySQL\MySQL Server 5.1\bin> mysql test_natures < F:\tablecreate.sql;如果在MYSQL行命令工具中则使用mysql> source F:/tablecreate.sql;
      

  4.   

    当您的问题得到解答后请及时结贴.
    http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html