如何在Windows 7中使用命令行执行大的MySql数据插入脚本文件? [英] How to execute large MySql data-insert script file using command line in Windows 7?
本文介绍了如何在Windows 7中使用命令行执行大的MySql数据插入脚本文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是新的MySQL,所以请指导我通过命令行如何做到这一点;我试过,但我在控制台输出没有日志记录,字符集不是 utf-8
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
请帮助。
推荐答案
由于您的SQL脚本不包含任何字符集配置指令, mysql
只是运行在其默认字符集Latin1。要更改默认字符集,请按如下所示启动 mysql
:
Since your SQL script doesn't contain any character set configuration directives, mysql
just runs in its default character set Latin1. To change the default character set, start mysql
like this:
mysql -e "source /path-to-backup/backup-file.sql" db_name --default-character-set=UTF8
这篇关于如何在Windows 7中使用命令行执行大的MySql数据插入脚本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文