Chat with us, powered by LiveChat
Change MYSQL Root Password

Change MYSQL Root Password

Forgot the MySQL root password :
First you will have to stop the MySQL service on the server.
# service mysqld stop
Start MySQL as
# /usr/bin/safe_mysqld skip-grant-tables &
Or
# /usr/bin/mysqld_safe skip-grant-tables &
safe_mysqld is a script that starts mysqld and traps any forceful termination of the MYSQL server and it prevents any database corruption.
Change the password for root user as
# mysql -u root mysqlmysql> UPDATE user SET Password=PASSWORD(new_password) WHERE user=root

mysql> FLUSH PRIVILEGES;

mysql> exit;
Start the MySQL service:
# service mysqld start

Sharing

Leave your comment

Pin It on Pinterest

Share This