WordPress 忘记管理员密码解决方案

There is also an English version available at https://lyfjerry.com/solution-on-forgetting-your-wordpress-admin-password/

今天突然发现我忘记了我的wordpress管理员密码,想写点东西都写不了,而且我的邮箱设置还有点问题,不能重置密码,折腾了好一会。

我的主页是基于群晖的web station做的。用的数据库是MariDB 10, 数据库管理系统是phpMyAdmin。尝试了使用mySQL 语句来进行删改,但是不太好用。我直接进数据库改了密码。然后我发现自己还忘记了数据库的密码,去群晖里mariDB里可以修改root密码,万幸我没有忘记我的群晖密码。(这里还有一个小插曲,我发现我改完数据库密码之后我都登不进去我的主页了,报的错是Error Establishing a Database Connection。这是因为改了数据库的管理员密码之后worldpress链接不上数据库了,可以在worldpress根目录下找到一个叫wp-config.php文件,里面有一项数据库密码( define (‘DB_PASSWORD’), ‘原始密码’)。改掉这个密码就行。话说为什么不直接在这里看密码呢?)

进入数据库之后选择最左边worldpress数据库,最下面有一个wp_users。点进去之后就有一个user目录,找到你的用户名之后在user_pass栏里面就是密码了。 但是这个密码是加密保护过的,但是用的md5,话说md5现在好像都用来检查完整性了。可以在网上随便找一个md5生成器,或者python内建库hashlib里有md5的生产器,把想设置的密码用MD5处理一下,然后在直接编辑数据库里那一条信息,就可以完美实现了。

Jerry

2021/3/14

7 thoughts on “WordPress 忘记管理员密码解决方案

  1. My spouse and I stumbled over here different web page and thought I may as well check things out.
    I like what I see so now i’m following you. Look forward to finding out about
    your web page repeatedly.

  2. Link exchange is nothing else except it is just placing the other person’s website link on your page at
    appropriate place and other person will also do same for you.

  3. Excellent way of explaining, and fastidious article to
    obtain information on the topic of my presentation topic, which
    i am going to present in university.

  4. Quality articles or reviews is the important to attract the people to go to see the
    web page, that’s what this site is providing.

  5. Great beat ! I would like to apprentice while you amend your web
    site, how could i subscribe for a blog site?
    The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast provided bright clear idea

Leave a Reply

Your email address will not be published. Required fields are marked *