MySQL Access Denied error

I am having this exact same problem despite following all the instructions here. Whenever I try to run sudo mysql -u root -p (using the password found in the root/.digitalocean_password file generated by Ghost setup), I get the error

Access denied for user 'root'@'localhost' (using password: YES)

Any other ideas @mjw ?

What OS, and what steps did you follow?

Likewise, is native password supported? The root password isn’t the MySQL password.

This may help.

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
QUIT;

Assuming you’re using Ubuntu on your Digital Ocean droplet, you need to connect to it as root (you can use the Droplet console) and then run the following commands, as mentioned by @mjw (and also as mentioned in the installation guide)

# Enter mysql
sudo mysql
# Update permissions
ALTER USER 'root'@'localhost' IDENTIFIED WITH 'mysql_native_password' BY '<your-new-root-password>';
# Reread permissions
FLUSH PRIVILEGES;
# exit mysql
exit

That will reset the password of the root MySQL user which then you can use in the Ghost installation script

I am using Ubuntu on my Digital Ocean droplet! When trying to follow those instructions, sudo mysql now gives me

Access denied for user 'root'@'localhost' (using password: NO)

Attempting to use mysql -u root -p gets me a password prompt, but I’m really not sure what password is expected here: I’ve tried leaving it blank, the root/.digitalocean_password, and my actual login password (used to SSH in to the root account)—none work. Without getting past this step, I can’t run the ALTER command to (re)set the password, so I’m a bit stuck. I feel like I must be missing something obvious here!

Strange. Assuming you have nothing on that droplet, I recommend starting over and choosing the Ghost image from the Marketplace when creating a new droplet:

It’s way easier, and Ghost would be pre-installed, avoiding the issue you mentioned.