这是我在 MySQL 控制台 (WAMP) 中使用的内容(没有密码,因为它是本地的)
mysql> mysql -u root -p dbase < table.sql
或者这个
mysql> mysql -u root -p dbase < C:\path\to\table.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 -u root -p dbase < table.sql' at line 1
什么可能导致这个问题?
最佳答案
您正在使用的命令应该在 mysql shell 之外运行。如果您只是退出
mysql shell 并输入相同的命令,它应该可以工作。
关于mysql - 在本地主机 WAMP 上使用 mysql 控制台导入表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12451424/