Knowledgebase

Find answer in our article collection



Portal Home > Knowledgebase > cPanel Questions > How do I reset my MySQL root password?


How do I reset my MySQL root password?




Login as root, then stop the MySQL server daemon.

# /etc/init.d/mysql stop

Start the MySQL server without a password.

# mysqld_safe --skip-grant-tables &

Connect to the MySQL server using the MySQL client.

# mysql -u root

Set a new MySQL root user password by entering the following four commands. Be sure to change "NEW_ROOT_PASSWORD" to your desired password.

# mysql> use mysql;
# mysql> update user set password=PASSWORD("NEW_ROOT_PASSWORD") where User='root';
# mysql> flush privileges;
# mysql> quit

Stop the MySQL server.

# /etc/init.d/mysql stop

Now start the MySQL server.

# /etc/init.d/mysql stop

Test to make sure your new MySQL root password works.

mysql -u root -p




Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
What is the minimum requirements for DA ? (Views: 4231)
How to DNS Blacklist with Exim? (Views: 8241)
Can i use my server for selling webhosting ? (Views: 4618)
Can I get any extra IP's ? (Views: 4457)
How do I mount a ISO images without burning to CD/DVD? (Views: 4580)

Powered by WHMCompleteSolution

QuatroVPS working with this vendors

Socialize

  • Facebook
  • Twitter
  • Linkedin
  • Google+
  • Youtube

Virtual servers for everyone