MySQL Empty cache Modify Forum Password

Source: Internet
Author: User
Tags md5 mysql commands


Log in to the Discuz forum database and execute the following MySQL commands:

[Email protected] control]# mysql-uroot-p

MySQL [(None)]> show databases;

Using the Discuz Forum database

mysql> use discuzdb;

Mysql> Show tables;

View the table structure in the Discuz forum database

mysql> desc pre_ucenter_members;

Query the DISCUZ forum Administrator account login password

Mysql> mysql> SELECT * from Pre_ucenter_members where username= "admin";

Set a new password, generate a key with MD5

Mysql> Select MD5 ("NewPassword");

+----------------------------------+

| MD5 ("NewPassword") |

+----------------------------------+

| da0ad52378e990f8e35b0f9d73b9961d |

+----------------------------------+

Change the password for the Forum Admin user based on the MD5 value set above

mysql> Update pre_ucenter_members set password= "da0ad52378e990f8e35b0f9d73b9961d" where username= "admin";

The following separately cleans up the MySQL database cache

Mysql> Flush hosts;

Query OK, 0 rows Affected (0.00 sec)

mysql> flush logs;

Query OK, 0 rows affected (0.04 sec)

mysql> flush Privileges;

Query OK, 0 rows Affected (0.00 sec)

mysql> flush Tables;

Query OK, 0 rows affected (0.01 sec)

mysql> flush status;

Query OK, 0 rows Affected (0.00 sec)

mysql> flush Tables;

Query OK, 0 rows Affected (0.00 sec)

mysql> flush status;

Query OK, 0 rows Affected (0.00 sec)

Then, login to the forum now, enter the user name admin, the new password, you can successfully login

The method of emptying the cache is primarily with the flush command in order to perform flush, you must have reload permissions

Flush hosts is primarily used to empty the host cache table

Flush logs is primarily to close the current binary log file and create a new file

Flush Privileges is mostly done every time after re-empowering, in case you want new permissions to take effect immediately

Flush Tables mostly closes all open tables, and the operation empties the contents of the query cache

flush tables With read lock primarily closes all open tables and adds a read lock to all tables in the database

Flush Status resets most state variables to 0

Flush Master deletes the binary log files in all binary log index files

Flush Query cache to restructure query caches to eliminate fragmentation and improve performance

Flush Slave is similar to resetting replication, allowing you to forget the replication location of the primary database from the database


MySQL empty cache modify Forum password

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.