mysql_secure_installation man page

mysql_secure_installation — improve MySQL installation security




This program enables you to improve the security of your MySQL installation in the following ways:

mysql_secure_installation helps you implement security recommendations similar to those described at Section 2.10.4, “Securing the Initial MySQL Accounts”.

As of MySQL 5.7.2, mysql_secure_installation is an executable binary available on all platforms. Before 5.7.2, it was a script available for Unix and Unix-like systems.

Normal usage is to connect to the local MySQL server; invoke mysql_secure_installation without arguments:

shell> mysql_secure_installation

When executed, mysql_secure_installation prompts you to determine which actions to perform.

As of MySQL 5.7.2, mysql_secure_installation supports these additional features:

mysql_secure_installation supports the following options, which can be specified on the command line or in the [mysql_secure_installation] and [client] groups of an option file. For information about option files used by MySQL programs, see Section 4.2.6, “Using Option Files”.

See Also

For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at


Oracle Corporation (


03/03/2018 MySQL 5.7 MySQL Database System