在命令行中,我创建了一个数据库:
create database mysql;
但是当我尝试使用以下命令上传数据库文件时:
mysql -u root -p database < dbdump.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 database < dbdump.sql' at line 1
答案 0 :(得分:0)
mysql -u root -p database<dbdump.sql