Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从终端导入带有 MySQL 的数据库? 该线程的语法
mysql -u username -ppassword databasename < filename.sql
为了简单起见,我对文件 (lahman591) 的输入放在了我的根目录上
mysql> mysql -u root -p lahman591 <c:\lahman591.sql
我得到一个错误:
ERROR 1064 (42000) You have an error in your sql syntax.
您需要从您的普通 shell(命令正在调用mysqlbin)而不是 mysql shell 执行此操作。
mysql