{"id":2369,"date":"2019-03-08T18:15:53","date_gmt":"2019-03-08T18:15:53","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=2369"},"modified":"2019-03-08T19:23:33","modified_gmt":"2019-03-08T19:23:33","slug":"reset-wordpress-admin-password-in-mysql","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/reset-wordpress-admin-password-in-mysql\/","title":{"rendered":"Reset WordPress admin password in MySQL"},"content":{"rendered":"\n<p>Log into MySQL from command line<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql -u root -p<\/pre>\n\n\n\n<p>Select the correct database<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">USE wordpress_db;<\/pre>\n\n\n\n<p>Print current users<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">SELECT * FROM wp_users;<\/pre>\n\n\n\n<p>Should get something similar to the following<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql> SELECT * FROM wp_users<br>     -> ;<br> +----+------------+------------------------------------+---------------+---------------------------+----------+---------------------+------------------------------------+-------------+--------------+<br> | ID | user_login | user_pass                          | user_nicename | user_email                | user_url | user_registered     | user_activation_key                | user_status | display_name |<br> +----+------------+------------------------------------+---------------+---------------------------+----------+---------------------+------------------------------------+-------------+--------------+<br> |  1 | admin    | 5f4dcc3b5aa765d61d8327deb882cf99 | admin       | bob@incredigeek.com       |          | 2018-08-09 10:10:42 |                                    |           0 | admin        |<br> |  2 | bob      | 210805fb52a13251f4bedc7e725e575a | bob         | bob@incredigeek.com       |          | 2019-11-01 11:31:23 |                                    |           0 | bob smith    |<br> +----+------------+------------------------------------+---------------+---------------------------+----------+---------------------+------------------------------------+-------------+--------------+<br> 3 rows in set (0.00 sec)<br> mysql><\/pre>\n\n\n\n<p>To update the password use<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">UPDATE wp_users SET user_pass = MD5('NewPass') WHERE ID=1;<\/pre>\n\n\n\n<p><em>The MD5 hashes the NewPass and adds it to the database.   You can print the users again to verify the hash changed. <\/em><\/p>\n\n\n\n<p>You should now be able to login using the new password you configure.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Log into MySQL from command line mysql -u root -p Select the correct database USE wordpress_db; Print current users SELECT * FROM wp_users; Should get something similar to the following mysql> SELECT * FROM wp_users -> ; +&#8212;-+&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8211;+ | ID &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/reset-wordpress-admin-password-in-mysql\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[135,72],"tags":[136,200,11,152,74],"class_list":["post-2369","post","type-post","status-publish","format-standard","hentry","category-mysql","category-wordpress","tag-mysql-2","tag-password","tag-reset","tag-reset-password","tag-wordpress-2"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=2369"}],"version-history":[{"count":4,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2369\/revisions"}],"predecessor-version":[{"id":2373,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2369\/revisions\/2373"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=2369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=2369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=2369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}