This question already has an answer here:
I have created a Ubuntu 18.01 droplet on digital ocean. while creating droplet I opted for one click LAMP installation.
Therefore I got mysql pre-installed. Now I am able to login as root by using a blank password. For example
mysql -u root -p . when it prompts for password. then It accepts whatever I enter there.
I want to set a password for root user and one should be able to login only with this password.
I've tried running
But in this script, there was no option to disable this feature.