LinuxCommandLibrary

mysql_secure_installation

improves MySQL security after installation

TLDR

Run secure installation wizard

$ mysql_secure_installation
copy
Run with socket
$ mysql_secure_installation --socket=[/var/run/mysqld/mysqld.sock]
copy
Run with defaults file
$ mysql_secure_installation --defaults-file=[/etc/mysql/my.cnf]
copy

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community