What should I do if I forget the MySQL root password? CWP reset/modify MySQL user password method

I just installed the CWP control panel , but I want to create a MySQL database , but I've forgotten the MySQL database password. What should I do?

Don't worry, if you want to check your password, please follow the instructions below.

View MySQL root user password method

You can use this command from the shell to view the MySQL root user password:

grep password /root/.my.cnf

What should I do if I forget the MySQL root password of CWP?

  • The MySQL root password can be reset by entering the SSH command.

To reset the MySQL root password, enter the following command via SSH:

sh /usr/local/cwpsrv/htdocs/resources/scripts/mysql_pwd_reset
If you enter the CWP control panel command to reset the MySQL root password, you cannot log inphpMyAdmin,How to do?
  • Use the SSH command shared in this article to reset the MySQL root password without using special characters.
  • Reset the MySQL root password using a mix of uppercase and lowercase letters and numbers.
  • Otherwise, errors may occur, preventing login to CWP control panel and phpMyAdmin control panel.

Please try to reset the MySQL root password again with the following command:

sh /scripts/mysql_pwd_reset

CWP modify MySQL specified user password

Go to phpMyAdmin -> “Accounts” tab :

  1. Click on the root user's"edit permission" ▼
    What should I do if I forget the MySQL root password? CWP reset/modify MySQL user password method
  2. Go to"change Password"Section -> Generate New Password ▼
    What to do if you forget your MySQL root password? CWP method for resetting/changing MySQL user passwords - Chen Weiliang Blog_Network Marketing Planning_Cross-border E-commerce Website Promotion Tutorial

  3. then click"execute (Go)” button ▲

Now you need to set a new password in your website's database configuration file.

If your website is built using WordPress , please modify the database password in the wp-config.php file.

Comment

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

Scroll to Top