标签:upd war user from log local tca not query
一、未进入之前:
1、grep password /var/log/mysqld.log 得出默认密码
2、更改密码
mysqladmin -uroot -p‘d-tlbwIgP3e2‘ password "QianFeng@123"
默认密码/老密码 新密码
3、登录数据库
mysql -uroot -p‘QianFeng@123‘
二、在数据库里:
方法一
1、set password for root@localhost = password(‘你要改的密码‘);
方法二
2、mysql> select user,host,authentication_string from mysql.user;
+---------------+-----------+-------------------------------------------+
| user | host | authentication_string |
+---------------+-----------+-------------------------------------------+
| root | localhost | *1288B346EB8ABFFC6F6F1B79C437AF124FFE05C7 |
| mysql.session | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
| mysql.sys | localhost | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE |
+---------------+-----------+-------------------------------------------+
rows in set (0.00 sec)
mysql> update mysql.user set
-> authentication_string=password(‘TianYun@52‘)
-> where user=‘root‘ and host=‘localhost‘;
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1
mysql> flush privileges;(刷新)
Query OK, 0 rows affected (0.00 sec)
三、取消密码复杂度
标签:upd war user from log local tca not query
原文地址:https://www.cnblogs.com/zjz20/p/11384589.html