1. Change the default port (default 3306)
The scanning of the port scan tool can be prevented to a certain extent
2. Delete the test database
Drop database test;
3. Password change is more complicated
# 1SetPassword forRoot@localhost=Password'Test'); # 2 UseMySQL;Update User SetPassword=Password'Test')where User='Root'; FlushPrivileges;
4. Delete the default User
Use deletefrom delete from user where Not (host=anduser=Privileges
5. Change the name of the default MySQL administrator
Use MySQL; Update User Set User = where User = Privileges
6. Disable remote connection to MySQL
A. Setting the account is not allowed to log in remotely, only on localhost
use update user set = '% ' where user='admin'; Select User from User
B. Authorize a specific user to log on from the MySQL
(1) Set the task host, can be based on a user name | password, login to all MySQL services database
Grant All Privileges on *. * to ' MyUser '@ '%' by'mypassword' Withgrantoptionprivileges;
(2) Set a host for a specific IP, log in to all databases of the MySQL service according to a username | password
Grant All Privileges on *. * to ' MyUser '@'192.168.1.3'by'mypassword' withgrantoptionprivileges;
(3) Set the host of a specific IP, according to a user name | password, login to the specified database (dk--database name)
Grant All Privileges on DK.*to'myuser' @'192.168.1.3' by 'mypassword'withgrantoption privileges;
Improve the security of your MySQL database