Retrieve MySQL and root password

Linode Staff

How do I retrieve my root password for my Linode and the MySQL root password if I forgot or lost it?

1 Reply

Hey there,

Linode Support is not able to retrieve these for you. You can still access your Linode using Lish from your Linode Manager.

If you lost your SSH credentials you can reset your root password from your Linode Manager.

If you don't have your MySQL credentials. You need to restart MySQL in

 sudo service mysql stop
 sudo mysqld_safe --skip-grant-tables --skip-syslog --skip-networking

Then run MySQL:

 mysql -u root

Run the following queries to change the password. Make sure to edit 'password' and 'root' in the command:

  UPDATE mysql.user SET authentication_string=PASSWORD('password') WHERE User='root'; FLUSH PRIVILEGES;

Quit MySQL in safe mode and start MySQL by entering the following commands:

 mysqladmin shutdown
 sudo service mysql start

After this last step MySQL should be running and you can access it with your new credentials.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct