How to execute a large mysql-paste script file using the command line in Windows 7?

I am new to MySQL, so please tell me how to do this via the command line; I tried, but I have no input to console output, and the character set is not utf-8

Please, help.

+4
source share
2 answers

Since your SQL script does not contain any character set configuration directives, mysql just runs in its default character set Latin1. To change the default character set, start mysql as follows:

 mysql -e "source /path-to-backup/backup-file.sql" db_name --default-character-set=UTF8 
+8
source
 mysql -e "source /path-to-backup/backup-file.sql" db_name 

or

 mysql db_name < backup-file.sql 

You will probably need -u username -p in your command.

mysqldump doc

+10
source

All Articles