Install and configure WordPress
https://ubuntu.com/tutorials/install-and-configure-wordpress#4-configure-apache-for-wordpress
直接登录服务器终端下,通过sql语句来修改新的密码;
下面示例中对应的明文密码为「123456」
UPDATE wp_users SET user_pass = '$1$rSziHLDY$399k.JuJsy.oHVp5lquJC.' WHERE ID = 1;
终端下执行
root@node100:~# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 29784
Server version: 8.0.40-0ubuntu0.22.04.1 (Ubuntu)
Copyright (c) 2000, 2024, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| wordpress |
+--------------------+
5 rows in set (0.00 sec)
mysql> use wordpress;
mysql> UPDATE wp_users SET user_pass = '$1$rSziHLDY$399k.JuJsy.oHVp5lquJC.' WHERE ID = 1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> SELECT ID, user_login, user_pass FROM wp_users;
更多参考链接:
https://wordpress.org/documentation/article/reset-your-password/