Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to modify the database password of the CVM

Shulou Source: shulou.com Published: 2022-06-02 00:49:47 10月20日 Update

In this issue, the editor will bring you how to modify the database password of the CVM. The article is rich in content and analyzes and describes it from a professional point of view. I hope you can get something after reading this article.

CVM users sometimes want to change their database password. Here we take the Windows system as an example to describe how to change the database MySQL root user password.

Know the password of the root user and change the new password

1. Take the local mysql installation directory C:\ Program Files\ MySQL\ MySQL Server 5.6\ bin as an example, open a command prompt window (start-run-cmd).

2. Go to the bin directory of the installation directory of mysql, enter the new password of mysqladmin-uroot-p password, and enter enter (take the new password as TXpass110 as an example).

3. Log in with the new password and find that you can log in to the CVM, so that the new password can be modified successfully.

Forgot the password of the root user and reset the new password

1. Open the system service (start-run-services.msc), find the mysql service, right-click the properties, and stop.

2. Open a command prompt window and run mysqld.exe-skip-grant-tables.

3. Open a command prompt window, use mysql-uroot to enter mysql, and use SQL statement to change the password. Take setting the new password as dashumysql as an example

Use mysql

Update mysql.user set password=PASSWORD ('dashumysql') where user='root' and host='root' or host='localhost'

Refresh the permissions table flush privileges; to exit mysql.

4. Start the task manager, end the mysqld.exe process opened above, open the system service (start-run-services.msc), find the mysql service, and right-click to start. Try to log in with the new password and you will be able to enter successfully.

The above is how the database password of the CVM shared by Xiaobian has been changed. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Tags: New password password service data database user run server command prompt directory system prompt login success content analysis attempt professional small and medium-sized Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Apple MySQL Xiaomi macOS