resetting mysql root user password

voip

New member
Joined
May 12, 2010
Messages
2
hi,

DirectAdmin installed DA for us - but they seem to have set a mysql root user password.

They have not informed us what it is, and seem to respond to emails only after 24 hours. I don't know if thats normal.

Any tips on best way to reset it?

thanx
 
reset password mysql root

Hi,

my da user for mysql is working fine.
but would need to reset the root password for mysql (don't have the previous password)
so, reading this, it is safe to reset the root password?
I mean, it will not interfere with the working of DA and any of the websites running on the webserver (all sites, users, ... are done with DA, nothing outside DA)

thanks

L.
 
Hello,

Normally directadmin is never using root's password for accessing MySQL. So you can connect to MySQL server with da_admin's password and change root's password, if it's really needed.
 
You can reset the mysql root password as follows,

SSH to server as root user and stop mysql
/etc/init.d/mysql stop

Now start it in safe mod as follows.
# mysqld_safe --skip-grant-tables &
# now enter mysql command prompt
# mysql
mysql> use mysql
mysql> update user set Password=PASSWORD('YOURNEWROOTPASS') where user='root';
mysql> flush privileges;

Now create the file /root/.my.cnf as follows

[client]
user=root
pass=YOURNEWROOTPASS


Now restart mysql server as normal .

After that enter into mysql prompt from root .
 
check /usr/local/directadmin/scripts/setup.txt

if this file has not been remove the root password generated is stored there.

Regards
 
Why the heck would you want to store your root mysql login in /root/.my.cnf that doesnt seem safe.
 
Back
Top