linux安装mysql时使用临时密码登录不进去mysql: [Warning] Using a password on the command line interface can be insec

原创 2018年04月16日 20:58:06

1.在root用户下,停止mysql

service mysqld stop

2.vi /etc/my.cnf

在[mysqld]的段中加上一句skip-grant-tables 

[mysqld]

skip-grant-tables 

shift+z+z;保存退出

3.重新启动mysql

systemctl start mysqld

3.登录修改mysql 的密码

[root@python2 hadoop]# mysql -uroot -p

Enter password: 

一直敲回车

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2

Server version: 5.7.21 MySQL Community Server (GPL)

看到welcome登录成功

5.FLUSH PRIVILEGES;  执行这条命令刷新

6.授权

mysql> GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%'IDENTIFIED BY 'mypassword' WITH GRANT OPTION; 

Query OK, 0 rows affected, 1 warning (0.01 sec)

6:修改密码

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456';

Query OK, 0 rows affected (0.00 sec)

7.退出  quit;

8. 到vi /etc/my.cnf 删除skip-grant-tables 

7.登录mysql 成功修改密码并登录

MySQL5.6 Using a password on the command line interface can be insecure解决方法;

1.最近把MySQL从5.5升到5.6以后,mysqldump居然不好用了,提示:  代码如下 复制代码 [root@qttc ~]# /usr/lo...
  • wk1063645973
  • wk1063645973
  • 2015-11-01 21:40:48
  • 35321

Warning: Using a password on the command line interface can be insecure .ERROR 1045 (28000): Access

在调试新的服务器时,出现了
  • jaray
  • jaray
  • 2014-09-03 08:57:33
  • 9833

linux安装mysql时使用临时密码登录不进去mysql: [Warning] Using a password on the command line interface can be insec

1.在root用户下,停止mysqlservice mysqld stop2.vi /etc/my.cnf在[mysqld]的段中加上一句skip-grant-tables [mysqld]skip-...
  • baiyan_er
  • baiyan_er
  • 2018-04-16 20:58:06
  • 8

cmd命令行下 Warning: Using a password on the command line interface can be insecure.

手动备份数据库(表的)方法   cmd控制台: mysqldump –uroot –proot 数据库 [表名1 表名2..]  > 文件路径 比如: 把temp数据库备份到 d:\temp....
  • nanshanzhihou
  • nanshanzhihou
  • 2014-11-04 14:54:55
  • 3036

Mysql 5.7密码过期修改密码

今天在运行项目的时候出现:“Your password has expired. To log in you must change it using a client that supports e...
  • u012365843
  • u012365843
  • 2015-09-14 11:17:44
  • 2983

Shell 脚本中执行mysql语句

对于自动化运维,诸如备份恢复之类的,DBA经常需要将SQL语句封装到shell脚本。本文描述了在Linux环境下mysql数据库中,shell脚本下调用sql语句的几种方法,供大家参考。对于脚本输出的...
  • robinson_0612
  • robinson_0612
  • 2014-10-14 15:02:00
  • 16349

MySQL 解决数据导出问题:Using a password on the command line interface can be insecure.

当使用mysql导出命令:mysqldump -uroot -proot test_db>test_db_bak.sql 警告提示信息:"Warning: Using a password on t...
  • navioo
  • navioo
  • 2016-06-17 12:17:00
  • 1957

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

mysql 备份报错mysqldump: [Warning] Using a password on the command line interface can be insecure. 解...
  • DN_XIAOXIAO
  • DN_XIAOXIAO
  • 2017-10-14 20:28:37
  • 1397

解决MySQL5.6出现"Using a password on the command line interface..."

今天老左有在帮一个网友搬家网站过程中,习惯导出MySQL数据库的时候采用mysqldump命令,但是意外发生了出现"Warning: Using a password on the command l...
  • c_fangfujiang
  • c_fangfujiang
  • 2016-09-07 11:17:25
  • 10091

zabbix监控mysql之Warning: Using a password on the command line interface can be insecure.

使用zabbix自带模板对mysql进行监控时,发现mysql5.6以上版本在使用mysqladmin时会发出警告:“Warning: Using a password on the command ...
  • z644041867
  • z644041867
  • 2017-10-31 18:11:42
  • 1406
收藏助手
不良信息举报
您举报文章:linux安装mysql时使用临时密码登录不进去mysql: [Warning] Using a password on the command line interface can be insec
举报原因:
原因补充:

(最多只允许输入30个字)