MySQL Setup white list tutorial

Source: Internet
Author: User

1 log in to MySQL

Mysql-h host-u username-p Password

2 Switch to MySQL library

 use MySQL;

3 View currently allowed login IP and user

Select Host,userfromuser;

4 Remove unnecessary IP and users that exist in the table

DELETE  from User WHERE User = ' username '  and Host='host';

(The host value of "%" or null means that all IPs can be logged in, generally such lines need to be deleted)

5 Increase the need for IP and users that are not in the table

GRANT  All Privileges  on *. *  to ' username '@'host'by'password'  with GRANT OPTION;

6 making the updated configuration effective

privileges;

Description

1. The host,username and password in the statement are modified according to the actual situation, the host name is IP or the hostname written to the Hosts file, in 4 and 5 can also be an IP segment, such as "192.168.220.0/255.255.255.0".

2. The whitelist restricts the "ip/User/password" group that can connect to the database, does not have the ability to connect to the database in the whitelist, and does not get banner information, so the scanner scan can be circumvented (the vulnerability is not really fixed).

MySQL Setup white list tutorial

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.