mysql 备份还原数据
备份
mysqldump -uroot -proot goodluck >'/media/sda7/gookluck.sql'
没成功的还原,我在 windows 和 ubundu 下都没成功,都没报错,提示成功,熟悉mysql 谈谈
mysqladmin -uroot -proot create google;
mysqldump -uroot -proot google <'/media/sda7/gookluck.sql'
mysqldump -uroot -proot google <'/media/sda7/gookluck.sql'
成功的还原
mysqladmin -uroot -proot create google;
mysql -uroot -proot google <'/media/sda7/gookluck.sql'
mysql -uroot -proot google <'/media/sda7/gookluck.sql'
导入时设置导出格式
C:\Program Files\MySQL\MySQL Server 5.0\bin>mysqldump -uroot -proot --default-ch
aracter-set=utf8 htwebsite > C:\bb.txt
aracter-set=utf8 htwebsite > C:\bb.txt