- windows, linux, DrayOS 4, imported, vigoracs, mysql_password, password_reset, acs_service, database_access
What Can I Do if I Forgot MySQL password?
If you forgot the MySQL password, you would not be able to launch the ACS program correctly. In other words, you cannot access the ACS service, and cannot write new data into the database. This article is going to demonstrate what could we do if we forgot the MySQL password.
Try the password which ACS store first
1. Check the MySQL password setting of VigorACS:
Open the file db.properties, and It will display the format root={password}, which means ACS will use the root as the username and {password} as the password to access the Database.
The location of two platforms is different:
-
For Windows:
{ACS path}\standalone\configuration\props\db.properties -
For Linux:
/usr/local/vigoracs/VigorACS/standalone/configuration/props/db.properties
2. Try to use this password to access the database
-
Windows: Launch the Start menu and search/open
MySQL Client. -
Linux:
#cd /usr/local/mysql/bin#./MySQL --defaults-file=/usr/local/mysql/my.cnf -uroot -p{password}
Reset the MySQL password
1. Stop the MySQL service first
- For Windows: Run services.msc and select the MySQL service to stop it.
-
For Linux: Run vigoracs.sh from the path
/usr/local/vigoracs/VigorACS/binand stop the MySQL service
After stopped MySQL, type the cmd #ps -aux | grep mysql to confirm there's no MySQL service running now
2. Change the security setting to allow access MySQL without a password
-
Windows:
- Edit the file my.ini from
{MariaDB parth}\data\. Addskip-grant-tablesunder the [mysqld], save and close it. - Run services.msc and select the MySQL service to re-launch it.
- Then, launch the Start menu to search and open
MySQL Client.
- Edit the file my.ini from
-
Linux: Use the following cmd to launch MySQL without checking the login password
#cd /usr/local/mysql/bin#./mysqld_safe --defaults-file=/usr/local/mysql/my.cnf --skip-grant-table &
3. Enter the database to reset the password to "YYY" by MySQL cmd:
#use mysql;#UPDATE user SET Password=PASSWORD("YYY") WHERE User='root';#flush privileges;#quit
4. Stop MySQL and change the MySQL security settings back
-
For Windows:
- Edit the file my.ini from
{MariaDB parth}\data\. Removeskip-grant-tablesunder the [mysqld], save and close it. - Run services.msc and select the MySQL service to re-launch it.
- Edit the file my.ini from
- For Linux: Kill the current mysqld_safe process and re-launch the MySQL by vigoracs.sh
5. After the change, the password will change to YYY. Please remember to modify the ACS file db.properties from old password {password} to new password YYY at the same time (the content should be root=YYY). You may need to restart the ACS service again.
-
Windows:
{ACS path}\server\default\conf\props\db.properties -
Linux:
/usr/local/vigoracs/VigorACS/server/default/conf/props/db.properties
