Menu Close

How to solve mysql_secure_installation blank password not working

Considering donating if you found my post helpful 😊

Buy Me a Coffee QR Code

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

Considering donating if you found my post helpful 😊

Buy Me a Coffee QR Code
1 2 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x