When installing mysql, I didn't get asked to create a password.

  • Posted December 29, 2019
  • Apache

I typed sudo apt-get install mysql-server, pressed “y” and it installed. Now when it asks me for the password when typing the mysql_secure_installation command what should I do?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello @UbuntuNoob123

as @KDSys said your probably best removing and starting again,

However, for people wanting to reset the root password, you can follow the tutorial:

How To Reset Your MySQL or MariaDB Root Password

Regards Simon Bennet SnapShooter DigitalOcean Backups

Hi @UbuntuNoob123,

Most probably it was displayed somewhere when you installed MySQL. What I’ll recommend you if it’s still a fresh installation is to remove the current MySQL and follow this DigitalOcean tutorial -

It’s for an Ubuntu OS however looking at your Nickname I would assume that’s what you are using.

The tutorial shows you everything necessary to install and configure it.

Regards, KDSys