Changing your MySQL root password

Testing for MySQL root password

You can try log into MySQL root as follows
mysql

If that doesn't work then your root password is not blank.  If you think you know the root password try log in as follows.
mysql -u root -p


Changing MySQL root password

If you cannot get in and you have no way of finding out your current MySQL root password or are not sure where to look you can simply change it.

service mysqld stop
mysqld_safe --skip-grant-tables &

You should see mysqld start in safe mode and then get a linux command prompt.  If you don't see a command prompt press the ENTER button and you should get it.

mysql --user=root mysql
update user set Password=PASSWORD('new-root-password') where user='root';
\q
service mysqld restart

  • mysql, root, password

Related Articles

I have a bunch of anonymous call attempts showing up in my call logs

I have a bunch of calls that look like this. 2011-11-18 00:27:10SIP/xx.xx...unknown"unknown"...

Do I need to do anything on the server/linux side of things?

You should not have to do anything on the server/linux side unless you want to tweak things or...

How hard is it to upgrade my server?

Upgrading resources such as memory, processing, hard drive space is instantaneous and does not...

Do you automatically upgrade our software when a newer version comes out?

Software upgrades are not automatic because they usually require service interruption.  We can...

Do you provided automatic backups.

Our premium plan includes automatic online backups.  All other plans can be backed up manually...