Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm new to MySQL. I am interested 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.

like image 686
Nam G VU Avatar asked Dec 01 '22 02:12

Nam G VU


1 Answers

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

like image 145
Jacob Avatar answered Dec 04 '22 10:12

Jacob