Mysql ERROR: ASCII ‘\0’ while importing sql file on linux server
Try something like : mysql -u root -p -h localhost -D database –binary-mode -o < dump.sql and make sure your sql file is not zipped.
Try something like : mysql -u root -p -h localhost -D database –binary-mode -o < dump.sql and make sure your sql file is not zipped.
The accepted answer by RandomSeed could take a long time! Importing the table (just to drop it later) could be very wasteful depending on size. For a file created using mysqldump -u user -ppasswd –opt –routines DBname > DBdump.sql I currently get a file about 7GB, 6GB of which is data for a log table … Read more
You can also use –init-command parameter of mysql command. I.e.: mysql –init-command=”SET SESSION FOREIGN_KEY_CHECKS=0;” … MySQL 5.5 Documentation – mysql options