Retrieve MySQL and root password
Linode
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
asilverman
Linode Staff
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.