NOTE: RUNNINGALLPARTSOFTHISSCRIPTISRECOMMENDEDFORALLMySQLSERVERSINPRODUCTIONUSE! PLEASEREADEACHSTEPCAREFULLY! Inordertologtailmysqltosecureit, wellneedthecurrentpasswordfortherootuser. Ifyouvejustinst
NOTE: running all parts of this script is recommended for all MySQLSERVERS in production use! Please read each step carefully! In order to log into MySQL to secure it, we'll need the current password for the root user. If you're 've just inst
NOTE: running all parts of this script is recommended for all MySQLSERVERS in production use! Please read each step carefully!
In order to log into MySQL to secure it, we'll need the current
Password for the root user. If you 've just installed MySQL, and
You haven't set the root password yet, the password will be blank,
So you shoshould just press enter here.
Enter current password for root (enter for none): <-- Enter the system root password
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
Root user without the proper authorisation.
Set root password? [Y/n] <-- ENTER
New password: <-- your MySQL root password
Re-enter new password: <-- your MySQL root password
Password updated successfully!
Reloading privilege tables ..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
To log into MySQL without having to have a user account created
- This is intended only for testing, and to make the installation
Go a bit smoother. You shoshould remove them before moving into
Production environment.
Remove anonymous users? [Y/n] <-- ENTER
... Success!
Normally, root shoshould only be allowed to connect from 'localhost'. This
Ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] <-- ENTER
... Success!
By default, MySQL comes with a database named 'test' that anyone can
- This is also intended only for testing, and shoshould be removed
Before moving into a production environment.
Remove test database and access to it? [Y/n] <-- ENTER
-Dropping test database...
... Success!
-Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
Will take effect immediately.
Reload privilege tables now? [Y/n] <-- ENTER
... Success!
Cleaning up...
All done! If you 've completed all of the above steps, your MySQL
Installation shoshould now be secure.
Thanks for using MySQL!