0% found this document useful (0 votes)
63 views1 page

Resetting Mysql Root Password: Red Hat and Centos: If You Need To Do This On A Debian System, Check Out This Post

This document provides steps to reset the MySQL root password on Red Hat or CentOS systems if it has been forgotten or for unauthorized access. The steps include stopping MySQL, starting it in safe mode to skip password checks, updating the password field in the mysql.user table for the root user, flushing privileges, stopping safe mode and restarting MySQL normally.

Uploaded by

duyluan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views1 page

Resetting Mysql Root Password: Red Hat and Centos: If You Need To Do This On A Debian System, Check Out This Post

This document provides steps to reset the MySQL root password on Red Hat or CentOS systems if it has been forgotten or for unauthorized access. The steps include stopping MySQL, starting it in safe mode to skip password checks, updating the password field in the mysql.user table for the root user, flushing privileges, stopping safe mode and restarting MySQL normally.

Uploaded by

duyluan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Resetting MySQL Root Password: Red Hat and CentOS

If you've forgotten your MySQL root password (or are involved with some nefarious activity), here is how you can reset that password on a Red at (R !L) system or a "ent#S system$ Stop MySQL$ root# service mysqld stop

Start MySQL in safe mode$ root# mysqld_safe --skip-grant-tables &

Log into MySQL as root$ root# mysql -u root

Reset the password$ mysql> update mysql.user set password=P !!"#$%&'(our)ewPass"*$%'+ w,ere -ser=.root./ mysql> flus, privileges/ e0it/

Log out of MySQL and stop the Safe Mode$ root# service mysqld stop

Start MySQL in the normal mode$ root# service mysqld start

Log into MySQL with your new password$ root# mysql -u root -p

1nter password2 mysql> %he a&ove info is for a Red at system, "ent#S, or Scientific Linu' setup( If you need to do this on a )e&ian system, chec* out this post(

You might also like