Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

How to set the root password on MySQL

Author: Edward Hardin Reference Number: AA-00692 Views: 4069 Last Updated: 08/11/2011 04:16 PM 0 Rating/ Voters

There are two ways of setting a new password for the root user.

Setting Password via Command Line

Run "MySQL Command Line Client"


Then run this query. Replace "root_password" with the desired password for the root user first.

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root_password');

Setting Password via Instance Config Wizard

Run "MySQL Server Instance Config Wizard".


Go through several steps of configuration and it will ask if you would like to change the root password:


Complete the wizard and the password will be changed.