Unable to import database from shell
Hi guys,
I'm trying to import big mysql DB from shell.
I ran:
mysql -uroot -p my_new_db < /bak3/old_db.sql
It asks for pass I provide and after few min all is finished.
But when I checked the user's DB (my_new_db) it's empty!
Where gone all the data?
Thank you!
-
OK, I found the problem! In the dump file there was command: Create table if not exist, trying to make old table which is not permitted. So I used: sed -i '/old_gb/ s//new_db/g' mysqldump.sql Because the file is more then 5GB. After that I was able to inserted in DB. Regards! 0 -
Hello, I'm glad to see you were able to solve the issue. Thank you for sharing the outcome. 0
Please sign in to leave a comment.
Comments
2 comments