mysql:mysql_secure_installation
mysql_secure_installation
Set root password? [Y/n]
UPDATE mysql.user SET Password=PASSWORD('$esc_pass') WHERE User='root';
Remove anonymous users? [Y/n]
DELETE FROM mysql.user WHERE User='';
Disallow root login remotely? [Y/n]
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');
Remove test database and access to it? [Y/n]
DROP DATABASE test;
DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'
Reload privilege tables now? [Y/n]
FLUSH PRIVILEGES;
mysql/mysql_secure_installation.txt · 最終更新: 2014/11/04 09:34 by clownclown