How Tos > Configure Password to the Database

Configure Password to the Database

Tags:  

Configuring Password to the Central Server's database


If you want to configure the Central server's database with a password (irrespective of whether MySQL is running on the Central Server or on the Remote machine), then make the following change on the Central Server:


  1. Open the database_params.conf file [centralhome\conf], uncomment the following line "#password public" and replace "public" with the "<password that is to be configured to the database>".
    Example: password efgh123

Once completing the above changes, you also need to update the MySQL user table with the appropriate set password. To do so follow the steps given below on the machine where MySQL is running:

  1. Start the MySQL application and login to it
  2. Connect to the database using the following command:
    use mysql;
  3. Now enter the following command to change the password
    update user set password=PASSWORD("NEWPASSWORD") where user='root';
         Example:
         update user set password=PASSWORD(efgh123) where user='root';


     4. 
Then reload the privileges to the user using the following command
         flush privileges;


     5.  Execute the following command only if MySQL is running on a remote machine
         grant all on *.* to root@'%' identified by '<password you have configured>' WITH GRANT                     OPTION;


     
6.  Quit from MySQL.



 RSS of this page

rtttr
rb