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