Delete anonymous users. After MySQL is installed, users with empty usernames and passwords are deleted. This makes it possible for the database server to be logged on without a password. Delete anonymous users to eliminate potential risks. [Root @ sample ~] # Mysql-u root-p login Enter password with the password root: Login here Enter the password Welcome to the MySQL monitor. commands end with; or \ g. your MySQL connection id is 7 to server version: 4.1.20Type 'help; 'or' \ H' for help. type '\ C' to clear the buffer. mysql> select user, host from mysql. user; users viewing user information + ------ + users + www.2cto.com | user | host | + ------ + users + | localhost | root | localhost | sample.centospub.com | root | sample.centospub.com | + ------ + ---------------------------- + 4 rows in set (0.02 sec) mysql> delete from mysql. user where user = ''; explain Delete anonymous user Query OK, 2 rows affected (0.17 sec) mysql> select user, host from mysql. user; users view user Information + ------ + -------------------------- + | user | host | + ------ + Principal + | root | localhost | root | sample.centospub.com | + ------ + Principal + author Yi Meng