MYSQL报警:Warning: Using a password on the command line interface can be insecure.
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了MYSQL报警:Warning: Using a password on the command line interface can be insecure.,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1134字,纯文字阅读大概需要2分钟。
内容图文
![MYSQL报警:Warning: Using a password on the command line interface can be insecure.](/upload/InfoBanner/zyjiaocheng/488/3574e7688fec4390952044286d9ed6ec.jpg)
解决方法:报警的意思是“在命令行输入密码是不安全的”,解决方法是将用户名和密码写入配置文件,然后在命令行用参数的形式引入文件
.config文件内容如下:
[mysql] user=abc password=abc123
mysql --defaults-extra-file=~/.config -hip -Pport -e "use db;delete from tb;";
如果.config文件中的user、password均正确,那么上面的sql会执行成功,并且没有任何报警。
附:可以变动的地方及注意点
1、.config文件中的第一行除了可以是[mysql],还可以是[client]。
2、.config文件中除了password是必须的其他参数都是可选的,可以写在配置文件中,也可以写在命令行中。
3、--defaults-extra-file参数必须放在第一位。
4、当mysql或mysqldump使用遇到困难时,除了可以问旁边的大神,还可以用mysql --help来帮助解决问题。
MYSQL报警:Warning: Using a password on the command line interface can be insecure.
标签:mysq 配置文件 default lin can mysqldump help 意思 --
本文系统来源:http://www.cnblogs.com/sunflower627/p/7265012.html
内容总结
以上是互联网集市为您收集整理的MYSQL报警:Warning: Using a password on the command line interface can be insecure.全部内容,希望文章能够帮你解决MYSQL报警:Warning: Using a password on the command line interface can be insecure.所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。