版权声明:本文为博主DbaH原创文章,允许转载,需要标明出处 https://blog.csdn.net/u011592350/article/details/52816113
Linux环境下,使用xtrabackup对mysql进行备份,执行的命令如下:
#innobackupex -uroot -pabc /usr/local/mysql_backup
出现如下错误:
“Error: mysql error: mysql: [Warning] Usinga password on the command line interface can be insecure.”
解决方法:找到my.cnf文件,默认路径为/etc/my.cnf,在该文件中添加以下内容
[client]
#20161013 add begin
host=localhost
user=root
password=abc
#20161013 add end
保存之后,重启mysql服务,命令如下:
#service mysqld restart
再次执行innobackupex备份,省略-u和-p参数,问题解决!