I have a 8GB sql file called test.sql.
I am running this command to import it into my database called test_db.
mysql -u root -p test_db > test.sql
After a few minutes, the file test.sql is emptied so that it is 0KB.
I am unsure if this is normal and the file will be restored when the command is finished, or if something is wrong. It's been half an hour and I don't see any data imported yet.
Why is test.sql becoming emptied of it's contents when I run this MySQL import command?
I am on Ubuntu 14.04 and MySQL 5.7.13.
You're using the wrong chevron. Should be the left chevron (<) not the right chevron (>).
This is what you meant:
mysql -u root -p test_db < test.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With