WHM overwrites MariaDB root password if set manually?

tBartel03

Member
Apr 4, 2020
10
0
1
United States
cPanel Access Level
Root Administrator
I recently reset my password for the root user of MariaDB. I later found my password not working and reset...and twice more. I had followed this tutorial and it was working fine. Is WHM resetting the password for some reason?
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,262
313
Houston
You need to set passwords like this through the UI of cPanel for pretty much all of cPanel/WHM related services. WHM uses whatever is in /root/.my.cnf as the password and will attempt to use what's set there as it has no way to know that you've changed the password if done manually.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,262
313
Houston
Which file? Like I said, it references /root/.my.cnf for the password. When you change through the UI it updates this file, when you change through the MySQL Commandline manually this is not updated.
 
  • Like
Reactions: tBartel03

tBartel03

Member
Apr 4, 2020
10
0
1
United States
cPanel Access Level
Root Administrator
Which file? Like I said, it references /root/.my.cnf for the password. When you change through the UI it updates this file, when you change through the MySQL Commandline manually this is not updated.
Again, that half answers my question. Something in WHM is - to my best guess, is overwriting the password so that only changing the password via WHM sticks. I am guessing this is some form of security mechanism?