Using apt to install MySQL will occur some question, first it is forgetting the database password by this way, or you could meet Access Deny because you not use sudo
So I will get you some tips to resolve this question.
- use
sudo apt install mysql-server
in terminal - use
sudo mysql -uroot -p
in terminal - use
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
in MySQL
now you can use mysql -uroot -p
connect mysql-server and enjoy it.