How to change Applications Manager MySQL password?
Note: Take backup of below information
* AppManagerHome\working\mysql\data\"mysql" folder
* AppManagerHome\working\mysql\"my.ini" file
* AppManagerHome\working\conf\MySQL\database_params.conf file
Follow the below steps to change mysql password:
1. Stop the instance of Applications Manager running currently.
2. Go to AppManagerHome/working directory and execute
./bin/startMYSQL.sh (for Linux)
.\bin\startMySQL.bat (for Windows)
3. Execute the following command in the command prompt of the Applications Manager server. This will connect to the Applications Manager MySQL.
If Applications Manager is running on Linux server,
AppManager_Home/working/mysql/bin/.\mysql -h localhost -u root -pappmanager --socket=../mysql.sock -A
If Applications Manager is running on Windows server,
AppManager_Home\working\mysql\bin\mysql.exe -h localhost -u root -pappmanager -P 13326 -A
Where, 13326 is the default MySQL port and this can be checked in
AppManager_Home/conf/AMServer.properties file in the "am.mysql.port" parameter value.
4. You will be prompted for password. Give the default password 'appmanager' and you will be connected to MySQL.
5. Execute the following commands in MySQL prompt in the same order as below
use mysql;
update user set PASSWORD=PASSWORD('password you want') where user='root';
flush privileges;
6.After this, stop the MySQL that is running.Open a new command prompt window, go to AppManagerHome/working/bin/ directory and execute
./stopMySQL.sh (for Linux)
stopMySQL.bat (for Windows)
6. Now go to AppManagerHome/working/mysql and edit my.ini file and give the same password which you gave earlier (password you want) in the place of password=appmanager (should be password=password you want) which will be currently present there.
7. Also change the value of password in database_params.conf file under AppManagerHome/working/conf/MySQL/ directory. Edit the file database_params.conf and you will see
# login password for the database if any
encryptedpassword eK6q1CJ9697s7O AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
Change it as below,
password appmanager AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB
Just replace the string 'appmanager' with the new password of the MySQL. Change the encryptedpassword to password and followed by your password of MySQL in the database_params.conf file, while starting it will be automatically encrypted.Restart Applications Manager and the password will be successfully changed.