Oracle/MSSQL/MySQL

How to reset Mysql Root password

The MySQL root password allows the root user to have full access to the MySQL database. You must have (Linux) root or (Windows) Administrator access to the Cloud Server to reset the MySQL root password.

Navigate to this path /etc/init.d/mysqld
- stop mysqld_safe --skip-grant-tables &
mysql -uroot -p ( hit enter, without any password)

- use mysql
- UPDATE mysql.user SET password=PASSWORD('your_new_password') WHERE user='root';
- FLUSH PRIVILEGES;
- quit

Next run the following command below to restart the service

/etc/init.d/mysqld restart
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x