在桌面上建了一个init-test-data.sql文件,然后在mysql里运行$ mysql -u root -p < init-test-data.sql
回车后输入SELECT * FROM students;
再回车就报错了,如下:
mysql> $ mysql -u root -p < init-test-data.sql
-> SELECT * FROM students;
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 < init-test-data.sql
Cynthia6268
在桌面上建了一个init-test-data.sql文件,然后在mysql里运行$ mysql -u root -p < init-test-data.sql
回车后输入SELECT * FROM students;
再回车就报错了,如下:
mysql> $ mysql -u root -p < init-test-data.sql
-> SELECT * FROM students;
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 < init-test-data.sql
SELECT * FROM students' at line 1
请问正确的操作步骤是什么?