Question

What is the root password asked by "mysql_secure_installation" script on a debian 9 system that was setup using SSH (i.e. no root password)?

$ mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we’ll need the current password for the root user. If you’ve just installed MariaDB, and you haven’t set the root password yet, the password will be blank, so you should just press enter here.

Enter current password for root (enter for none): ERROR 1698 (28000): Access denied for user ‘root’@‘localhost’


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Hi @dx486107

Like it says in the note, if you just installed MariaDB yourself manually, then there is no password and you can just press enter.

EDIT: Also note that root via SSH has nothing to do with root via MariaDB.