站内搜索

LNMP 修改 MySQL root 密码最简单的方法!

最近有一个小站被恶意发帖,导致大量灌水。于是,索性对小站做一次全面排查。想到很久没有修改 MySQL 数据库的 root 密码了,立马行动!找了下资料,并亲自测试,其实就两条命令:
wget http://soft.vpser.net/lnmp/ext/reset_mysql_root_password.sh
sh reset_mysql_root_password.sh

[root@HQW-Aliyun ~]# wget http://soft.vpser.net/lnmp/ext/reset_mysql_root_password.sh 
--2023-09-10 16:51:53--  http://soft.vpser.net/lnmp/ext/reset_mysql_root_password.sh
Resolving soft.vpser.net... 81.70.180.148
Connecting to soft.vpser.net|81.70.180.148|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://soft.lnmp.com/lnmp/ext/reset_mysql_root_password.sh [following]
--2023-09-10 16:51:53--  https://soft.lnmp.com/lnmp/ext/reset_mysql_root_password.sh
Resolving soft.lnmp.com... 8.217.207.197
Connecting to soft.lnmp.com|8.217.207.197|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2464 (2.4K) [application/octet-stream]
Saving to: a€?reset_mysql_root_password.sha€?

100%[===============================================>] 2,464       --.-K/s   in 0s      

2023-09-10 16:51:54 (236 MB/s) - a€?reset_mysql_root_password.sha€? saved [2464/2464]

[root@HQW-Aliyun ~]# sh reset_mysql_root_password.sh
+-------------------------------------------------------------------+
|   Reset MySQL/MariaDB root Password for LNMP, Written by Licess   |
+-------------------------------------------------------------------+
|       A tool to reset MySQL/MariaDB root password for LNMP        |
+-------------------------------------------------------------------+
|       For more information please visit https://lnmp.org          |
+-------------------------------------------------------------------+
|           Usage: ./reset_mysql_root_password.sh                   |
+-------------------------------------------------------------------+
Enter New mysql root password: xxxxxxxxxxxxx
Stoping mysql...
Shutting down MySQL. SUCCESS! 
Starting mysql with skip grant tables
update mysql root password...
Password reset succesfully. Now killing mysqld softly
Restarting the actual mysql service
Starting MySQL.. SUCCESS! 
Password successfully reset to 'xxxxxxxxxxxxx'
[root@HQW-Aliyun ~]# q 
  • enverahep 说:

    To the residue was added water 500 mL, the mixture stirred for 20 min and the solid collected by filtration and dried in vacuo, azeotroping with toluene 3, to give the title compound as an off white solid 12 priligy medication Eggs, sperm, or embryos that have not been frozen

    2024-11-9 23:23:10 Google Chrome 124 Windows 10回复
  • cytotec pills for sale 说:

    Various compounds have been used for postcoital contraception, or for what is commonly referred to as the morning after pill can i get generic cytotec

    2024-11-30 16:33:12 Google Chrome 124 Windows 10回复
    Copyright © XiakeShu.com 版权所有 | 备案号:浙ICP备11004787号-12