mysql5.6版本备份报错

Posted 浩0x208哥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql5.6版本备份报错相关的知识,希望对你有一定的参考价值。

mysql5.6版本备份报错,密码不安全

[[email protected] mysql]# mysqldump -uroot -ppassword cz-office > mysql38.sql
Warning: Using a password on the command line interface can be insecure.

解决方法1:进行交互式输入密码,

[[email protected] mysql]# mysqldump -uroot -p cz-office > mysql38.sql

会让你输入MySQL用户root的密码,

解决方法2:在配置文件my.cf里面添加一下内容:

[mysqldump]
user=root
password=password

保存退出,从新启动mysql

备份的时候可以省略不输入用户名和密码就可以;如果是备份的脚本的话,也一样;

[[email protected] mysql]# mysqldump cz-office > mysql38.sql

 




以上是关于mysql5.6版本备份报错的主要内容,如果未能解决你的问题,请参考以下文章