zoukankan      html  css  js  c++  java
  • Using Command Line to Reset WordPress’s User Password

    You might have direct access to your MySQL database from the command line. Usually this is done by sitting at your server, connecting directly to your server via SSH, or using the MySQL client on your workstation to connect to your server. You must be in the correct context to successfully execute the mysql command mentioned below.

    To reset your WordPress password from the MySQL command line, do the following (replace the options in italics with your settings):

       1. "mysql -u root -p" (Logs in to MySQL)
       2. Enter your password at the prompt.
       3. "use name-of-database" (Selects your WordPress database)
       4. "show tables LIKE '%users';" (Finds the WordPress user table)
       5. "SELECT ID, user_login, user_pass FROM name-of-table-you-found WHERE user_login = 'username';" (Observe the encrypted password)
       6. "UPDATE name-of-table-you-found SET user_pass=MD5('new-unencrypted-password') WHERE user_login = 'username';" (Updates the database with the encrypted password)
       7. "SELECT ID, user_login, user_pass FROM name-of-table-you-found WHERE user_login = 'username';" (Confirm that it was changed)
       8. "exit" (Exits the MySQL client)
       9. Login to WordPress using the username and password that you've altered.

  • 相关阅读:
    codevs 1202 求和
    codevs 1201 最小数和最大数
    nyist 240 小明的调查统计(二)
    nyist28大数阶乘
    nyist 626 intersection set
    【】小技巧】CSS文字两端对齐
    Vue.js项目模板搭建
    25个最基本的JavaScript面试问题及答案
    java抽象类与接口的区别及用法
    JQuery事件手册
  • 原文地址:https://www.cnblogs.com/lei1016cn/p/1847538.html
Copyright © 2011-2022 走看看