Top Nav

How-to Secure A New MySQL Installation

After install MySQL, it’s important that you secure the installation by (a) removing anonymous accounts and (b) setting a password on the admin account. This can be done with mysqladmin or with direct SQL queries. I prefer the SQL queries so that’s what I’ll show here.

  1. Start mysql command line utility and select the mysql database.
  2. Remove anonymous accounts.
  3. Set a password on the mysql root account.
  4. Flush privileges.

Email
Print