+ Reply to Thread
Results 1 to 1 of 1
Thread: MySQL Root Password Reset
-
Administrator
- Join Date
- Mar 2010
- Posts
- 76
MySQL Root Password Reset
MySQL Root Password Reset
So let us do the following:-When you try to install mysql using rpm then some times you have faced password authentication problem. This is not an issue, it means your mysql server is working fine but need authentication to access it.
This is for killing the mysql process running in the server.Code:$ pkill -9 mysql
Please read the password from the above file, if it is cpanel server.Code:cat /root/.my.cnf
Now do the following command in the mysql prompt:-
Code:$/usr/libexec/mysqld --skip-grant-tables --user=root &
Go back into MySQL with the client:This skip-grant-tables option causes the server not to use the privilege system at all. This gives anyone with access to the server unrestricted access to all databases.
You have now reset mysql root in the server. So you need to kill all the mysql process following command:-Code:MySQL > UPDATE user SET Password=PASSWORD('YOUR_PASSWORD') WHERE Host='localhost' AND User='root';
Start MySQL the normal way for your system.Code:$ killall mysqld
You can now access mysql and login as root using the password which you have set using UPDATE command.Code:/etc/init.d/mysqld start


LinkBack URL
About LinkBacks



Reply With Quote