Setting up “ghost” mysql user


I have installed several ghost instances in the past but I never ran into this issue before.

All seems to go well except that it fails at “Setting up “ghost” mysql user”.

I tried a few things suggested by users in recent posts about Mysql issues, but for the mysql -u root -p or sudo mysql I have an error:

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

and I haven’t been able to go around it.
I tried running the setup again. I did several reset of the vps as well, but it keeps failing there.

It’s on a Ubuntu 22.04, and I followed the official documentation to set up ghost.

These are the steps needed for Ubuntu 22.04.

Note that you need to set a password.

sudo apt update && sudo apt upgrade --yes
sudo apt install mysql-server --yes
sudo systemctl start mysql.service
sudo mysql

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

sudo mysql_secure_installation


Thanks for replying. :)
I did try that from another thread, but when I do sudo mysql, I have this message

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

The root account has a password set.

You need to use sudo mysql -u root -p with the password set in the earlier instruction.


After some more tries, it finally works. I honestly do not know what was the issue.

Thanks @mjw for your help. :slight_smile:

1 Like