How Do I Reset MySQL Root Password?

Linode Staff

Hey there,

I'm running a MySQL DB on my Linode that runs Ubuntu 14.04, but I don't remember the MySQL root password. I tried running through some guides, but kept running into issues which I've included below:

[email protected]:~# sudo /etc/init.d/mysql stop
stop: Unknown instance:
[email protected]:~# sudo mysqld_safe --skip-grant-tables &
[1] 4670
[email protected]:~# 200611 20:17:02 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
200611 20:17:02 mysqld_safe Logging to '/var/log/mysql/error.log'.
200611 20:17:02 mysqld_safe A mysqld process already exists

[email protected]:~# sudo dpkg-reconfigure mysql-server-5.7
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/sbin/dpkg-reconfigure: mysql-server-5.7 is broken or not fully installed

Can someone help me figure out why this isn't working?

1 Reply

Linode Staff

Hey there -

We have another post here on the site that shows you how to change your MySQL root password, and I'll link it to you here:

https://www.linode.com/community/questions/17988/how-do-i-reset-mysql-root-password

I hope that helps you out!

Reply

Please enter an answer
Tips:

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] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct