HowTo: Reset MySQL root password

Administration, Info.Tech, Linux System Administration, SQL: Structured Query Language Add comments

This is the way to reset MySQL server password in Centos Linux, steps below:

# /etc/init.d/mysql stop
# /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &
# mysql -u root
mysql> use mysql;
mysql> UPDATE user SET Password = '' WHERE User = 'root';
mysql> exit

# /etc/init.d/mysql stop
# /etc/init.d/mysql start

You may also use service to start and stop the mysql.

#service mysqld start
#service mysqld stop

Comments are closed.

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in