简体   繁体   中英

How import from sql file to mysql db in ruby on rails using cloud9?

I added file dump.sql to my project in folder db Dump volume 2,5 gb

Next my steps:

mysql-ctl cli 
mysql> use c9
mysql> source /home/ubuntu/workspace/myproject/db/dump.sql

displayed error:

Failed to open file '/home/ubuntu/workspace/myproject/db/dump.sql', error: 2

How can I solve this error?

From the command line, change directory to whatever directory your dump.sql file is located in and then run:

mysql -u username -p c9 < dump.sql


Source: Run .sql file through command line in MySQL

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM