栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 数据库 > MySQL

mysql 报错:Using a password on the command line interface can be insecure.用法

MySQL 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

mysql 报错:Using a password on the command line interface can be insecure.用法

意思:在命令行中直接输入密码账号信息是不安全的

这个是在MySQL5.6版本以后才出现的

出现场景

1、登录mysql的时候

#mysql -uroot -p数据库密码

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

解决方式:

#mysql -uroot -p   回车,提示输入密码

2、在mysqldump中使用

#mysqldump -uroot -p你的密码 数据库名 > 存放位置 备份文件名.sql

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

解决方法修改mysql配置文件

#vim /etc/my.conf

加入下面内容:

[mysqldump]
user=root
password=你的密码

然后重启服务器,修改mysqldump语句,去掉-uroot -p参数

#mysqldump 数据库名 > 存放位置 备份文件名.sql  


转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/828768.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号