MySQL から WordPress パスワードリセット
Nid: 1228
DB接続
$ sudo mysql -u root -D db_octaviadata.com
MariaDB [db_octaviadata.com]> show tables; +---------------------------------+ | Tables_in_db_octaviadata.com | +---------------------------------+ | wp_commentmeta | | wp_comments | | wp_links | | wp_options | | wp_postmeta | | wp_posts | | wp_term_relationships | | wp_term_taxonomy | | wp_termmeta | | wp_terms | | wp_usermeta | | wp_users | +---------------------------------+ 12 rows in set (0.001 sec) MariaDB [db_octaviadata.com]> SELECT ID, user_login, user_pass FROM wp_users; +----+------------+------------------------------------+ | ID | user_login | user_pass | +----+------------+------------------------------------+ | 1 | admin | 3cca19d52b6a83a136625dd8de7eb41a | +----+------------+------------------------------------+ 1 rows in set (0.000 sec)
パスワードリセット
MariaDB [db_octaviadata.com]> UPDATE wp_users SET user_pass = MD5('newpassword') WHERE ID=1; Query OK, 1 row affected (0.052 sec) Rows matched: 1 Changed: 1 Warnings: 0 MariaDB [db_octaviadata.com]> SELECT ID, user_login, user_pass FROM wp_users; +----+------------+------------------------------------+ | ID | user_login | user_pass | +----+------------+------------------------------------+ | 1 | admin | $P$BbJySxWWFAvLksoIWVP.DElVAK5cY21 | +----+------------+------------------------------------+ 1 rows in set (0.000 sec) MariaDB [db_octaviadata.com]> \q Bye