Stefan Hansch
Stefan Hansch

Reputation: 1590

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?

Upvotes: 1

Views: 1563

Answers (1)

Brady Dowling
Brady Dowling

Reputation: 5532

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

Upvotes: 2

Related Questions