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. Interactive wizard that sets root password, removes anonymous users, disables remote root login, and removes test database. Recommended for new installations.
PARAMETERS
--socket path
Unix socket file.--host host
MySQL server hostname.--port port
TCP/IP port number.--user user
MySQL username.--defaults-file file
Configuration file.
SEE ALSO
mysql(1), mysqladmin(1)
