How to reset the root password for MySQL?

Linode Staff

There is mysql service installed to server, but I don´t remember the root password. Is it possible to reset it?

1 Reply

You will want to stop your MySQL service first: sudo systemctl stop mysql.service

To go through the initial configuration for setting you your MySQL password: sudo dpkg-reconfigure mysql-server-5.5

Link to our guide for resetting your MySQL root password


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