How to execute large MySql data-insert script file using command line in Windows 7?

Nam G VU picture Nam G VU · Jul 18, 2011 · Viewed 24.2k times · Source

I'm new to MySQL so please guide me through how to do this via command line; I've tried but I get NO logging in the console output and the character set is not utf-8

Please help.

Answer

Jacob picture Jacob · Jul 18, 2011
mysql -e "source /path-to-backup/backup-file.sql" db_name

or

mysql db_name < backup-file.sql

You probably need -u username -p, too in your command.

mysqldump doc