Need To Change MySQL Root Password

Discussion in 'Installation/Configuration' started by Gregory S Tibbetts, Jan 12, 2019.

  1. I need to change my MySQL root Password. Here is my dilemma. During the set up process of ISPConfig I had to enter the root password of mysql. How do I tell ispconfig what the new root password is? I couldn't find anything in the admin where I could enter the new password. Can anyone help?
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    /usr/local/ispconfig/server/lib/mysql_clientdb.conf
     
  3. Is there a configuration file for ispconfig and where is it?
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Configuration files are in /usr/local/ispconfig/.
     
  5. yordanov

    yordanov New Member

    I have the same issue on my server - had to change the database root password, and since then nothing works anymore. Changing it in /usr/local/ispconfig/server/lib/mysql_clientdb.conf unfortunately doesn't help. Please somebody advise what to do!
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The file /usr/local/ispconfig/server/lib/mysql_clientdb.conf is the only place where the root password is used and this password is only used while creating a new database or database user, so even if its wrong, it will not affect other functions or ISPConfig in general. If services stopped working, then you probably have changed other passwords as well like the password of the user 'ispconfig'.
     
  7. yordanov

    yordanov New Member

    Hi till, thank you for your kind reply. I corrected my mistakes and now everything is fine.
     
    till likes this.
  8. Hello, @Gregory S Tibbetts
    Follow these steps to reset mysql root password on linux.

    Step 1:- Stop the mysql server.
    Code:
    /etc/init.d/mysql stop
    Step 2:- Start the mysql server manually without permission tables which allows us to login as root user without password.
    Code:
    mysqld_safe --skip-grant-tables & 
    Step 3:- Login into mysqlas root user without a password and switch to the database.
    Code:
    mysql -u root mysql
    Step 4:- Then execute this SQL query to set a new password.
    Code:
    update user set Password=PASSWORD('newpassword') WHERE User='root'
    Note:- Replace newpassword with the new new root password.
    Step 5:- Then logout form the mysql using exit.
    Step 6:- Now bring back the running mysql instance into the foreground using fg and then press ctrl + c to kill the mysql process.
    Step 7:- Start the mysql server.
    Code:
    /etc/init.d/mysql start
    I hope above information will be useful for you.
    Thank you.
     

Share This Page