时间:2021-07-01 10:21:17 帮助过:2人阅读
--datadir="$datadir"--pid-file="$mysqld_pid_file_path" $other_args >/dev/null2>&1 &
wait_for_pid created "$!""$mysqld_pid_file_path"; return_value=$?
保存退出
mysql> use mysql
Readingtable information for completion of table and column names
You canturn off this feature to get a quicker startup with -A
Databasechanged
mysql> select user,host,password from user;
+---------+-----------------------+-------------------------------------------+
|user | host | password |
+---------+-----------------------+-------------------------------------------+
|root | localhost |*4941369BD46398A2BDEEC85411065D7137D4EA0F |
|root | localhost.localdomain |*4941369BD46398A2BDEEC85411065D7137D4EA0F |
|root | 127.0.0.1 |*4941369BD46398A2BDEEC85411065D7137D4EA0F |
|tianke | % |*A399693A49F7EC7C548D0FC376FA52AD293A552F |
|tianke1 | % |*EEAC51414F1AE247D67F47A875BDB134CF39986C |
+---------+-----------------------+-------------------------------------------+
5 rowsin set (0.01 sec)
修改root密码
mysql> update user setpassword=password(‘123456‘) whereuser=‘root‘;
QueryOK, 3 rows affected (0.00 sec)
Rowsmatched: 3 Changed: 3 Warnings: 0
然后将服务再次停掉,然后再将掺数改回重启mysql即可。
版权声明:本文为博主原创文章,未经博主允许不得转载。
Mysql找回管理员密码
标签: