mysql: [Warning] Using a password on the command line interface can be insecure

MySQL 5.6 警告信息 command line interface can be insecure

在命令行输入密码,就会提示这些安全警告信息。

Warning: Using a password on the command line interface can be insecure.

注: mysql -u root -pPASSWORD 或 mysqldump -u root -pPASSWORD 都会输出这样的警告信息.

1、针对mysql

mysql -u root -pPASSWORD 改成mysql -u root -p 在输入密码即可.

2、mysqldump就比较麻烦了,通常都写在scripts脚本中。

解决方法一:

对于 mysqldump 要如何避免出现(Warning: Using a password on the command line interface can be insecure.) 警告信息呢?

vim /etc/mysql/my.cnf

[mysqldump]

user=your_backup_user_name

password=your_backup_password

修改完配置文件后, 只需要执行mysqldump 脚本就可以了。备份脚本中不需要涉及用户名密码相关信息。

解决方法二:

任意创建文件件,创建。my.cnf文件 内容

[mysql]

host=172.17.22.124

user=your_backup_user_name

password=your_backup_password

执行方式  HOME=/home /data/opt/mysql/bin/mysql -e "show slave status\G;"| egrep "_Running|Behind_Master" >slave.log

Mysql: [Warning] Using a password on the command line interface can be insecure的更多相关文章

  1. zabbix 3.4监控mysql,提示mysql: [Warning] Using a password on the command line interface can be insecure.

    mysql从5.6版本开始,如果是命令行直接出现了数据库连接密码就会有以下警告: mysql: [Warning] Using a password on the command line inter ...

  2. mysql: "Warning: Using a password on the command line interface can be insecure." 解决方法

    错误重现: 命令行或者shell脚本中执行以下命令,如果您当前服务器mysql版本是大于5.6的,则会出现警告:Warning: Using a password on the command lin ...

  3. MySQL Warning: Using a password on the command line interface can be insecure.解决办法

    转自 http://www.cnblogs.com/sunss/p/6256706.html  被一个小朋友问到,直接公布答案: If your MySQL client/server version ...

  4. mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    错误情况 解决办法: 首先查看mysql的命令 其次修改root用户的密码 set password for 'root'@'localhost' = password('123456'); 最后退出 ...

  5. MYSQL5.7脚本运行时出现[Warning] Using a password on the command line interface can be insecure

    MYSQL版本:5.7 在写linux脚本执行MYSQL命令的时候,如果使用 MYSQL="mysql -hlocalhost -P3306 -uroot -p666666" 登陆 ...

  6. MySQL 5.6 Warning: Using a password on the command line interface can be insecure

    MySQL 5.6 在命令行输入密码,就会提示这些安全警告信息. Warning: Using a password on the command line interface can be inse ...

  7. mysql 备份报错mysqldump: [Warning] Using a password on the command line interface can be insecure.

    -------------------------------------------------------------------------------- mysql 备份报错mysqldump ...

  8. MYSQL报警:Warning: Using a password on the command line interface can be insecure.

    问题描述:执行下面的语句,sql是执行成功了,但是出现了一个报警,报警看上去始终不舒服 mysql -hip -Pport -uuser -ppassword -e "use db;dele ...

  9. 解决mysql连接输入密码提示Warning: Using a password on the command line interface can be insecure

    有时候客户端连接mysql需要指定密码时(如用zabbix监控mysql)5.6后数据库会给出个警告信息 mysql -uroot -pxxxx Warning: Using a password o ...

随机推荐

  1. Spring Boot配置随机数

    Spring Boot支持在系统加载的时候配置随机数. 添加config/random.properties文件,添加以下内容: #随机32位MD5字符串 user.random.secret=${r ...

  2. 移动端自动化测试appium 从入门到项目实战Python版✍✍✍

    移动端自动化测试appium 从入门到项目实战Python版 整个课程都看完了,这个课程的分享可以往下看,下面有链接,之前做java开发也做了一些年头,也分享下自己看这个视频的感受,单论单个知识点课程 ...

  3. java-day18

    函数式接口在java中指:有且仅有一个抽象方法的接口 @FunctionalInterface注解:可以检测接口是否是一个函数式接口 函数式接口的使用:一般可以作为方法的参数和返回值类型 自定义函数式 ...

  4. HXY烧情侣

    题目描述 众所周知,HXY已经加入了FFF团.现在她要开始喜(sang)闻(xin)乐(bing)见(kuang)地烧情侣了.这里有n座电影院,n对情侣分别在每座电影院里,然后电影院里都有汽油,但是要 ...

  5. 基于角色访问控制的OA系统的设计与实现

    摘要:随着电子政务的快速发展和全面普及,办公自动化(OA)系统的安全性显得越来越重要.对基于Web 的B/S 结构的OA 系统结构和安全需求进行了分析,为了增强用户身份鉴别和授权控制的安全性,分析了基 ...

  6. centos6.5下,使用虚拟ftp用户

    因为业务的问题,有位客户的账户总是出现各种问题,本人对于acl的使用又不是很会,所以和同事一起研究了一下这个虚拟ftp用户. Centos6.5 1 需求 为了保证系统的安全性,现对系统中vsftpd ...

  7. python中常见的内置函数

    map #自定义map函数 def map_test(func, list): res = [] for item in list: res.append(func(item)) return res ...

  8. springcloud -zuul(1-zuul的简单使用)

    1.maven引入包 <dependency> <groupId>org.springframework.cloud</groupId> <artifactI ...

  9. Batch - 忽略FORFILES “no files found” error

    ref:https://stackoverflow.com/questions/16820681/suppress-forfiles-no-files-found-error Solution: Th ...

  10. spring boot+vue.js发送post时一直415,swagger却很正常

    首先百度说要加header为applicaiton/json,加完后一直400,说json不符合格式,webstorm说要单引号,spring boot那边要双引号...... 后来不知道看了哪里说把 ...