Securing Your MySQL Installation

Many distributions of Linux have an option to install MySQL. In this case, or even if you compile MySQL, the default password is blank.

Make sure that you set password for the root user. This is the command:

mysql -u root mysql
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('s3cr3tp4s5w0rd');

Leave a Reply