Menu Close

How to solve mysql_secure_installation blank password not working

When you first install MySQL or MariaDB, root password is set to blank. So when you are trying to use a command such as mysql_secure_installation, you should be able to log into the root user account just by leaving it empty and hit ENTER. But you are here because it doesn’t work, right?

Solution

Instead of running

$ mysql_secure_installation

run the command with sudo instead

$ sudo mysql_secure_installation
1 2 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x