mysql_secure_installation
improves MySQL security after installation
TLDR
Run secure installation wizard
$ mysql_secure_installation
Run with socket$ mysql_secure_installation --socket=[/var/run/mysqld/mysqld.sock]
Run with defaults file$ mysql_secure_installation --defaults-file=[/etc/mysql/my.cnf]
SYNOPSIS
mysql_secure_installation [options]
DESCRIPTION
mysql_secure_installation improves MySQL security after installation. The interactive wizard performs the following steps: set or change the root password, remove anonymous users, disallow remote root login, remove the test database, and reload privilege tables. It is recommended for all new installations.The program reads the [mysql_secure_installation] and [client] groups from option files.
PARAMETERS
--socket path
Unix socket file for connections to localhost.--host host
MySQL server hostname.--port port
TCP/IP port number.--user, -u user
MySQL username for connecting to the server.--defaults-file file
Read only the specified option file.--no-defaults
Do not read any option files.--use-default
Execute noninteractively using default answers. Useful for unattended installation.--password, -p password
The current password for connecting.
SEE ALSO
mysql(1), mysqladmin(1)
