Setting up “ghost” mysql user

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>';
QUIT;

sudo mysql_secure_installation
2 Likes