Some defense measures for MySQL database in terms of Network Security

Source: Internet
Author: User

With the popularization of networks, more and more network-based applications are available. Network databases are one of them. One or several servers can provide services to many customers. This method brings a lot of convenience to people, but it also gives criminals a chance to take advantage of it. Because the data is transmitted over the network, it can be intercepted during transmission or accessed through a very convenient means. For the above reasons, database security is very important. Therefore, this article discusses the above issuesMySQL databaseInNetwork Security.

Account Security

Account is the simplest security measure for MySQL. Each account consists of the user name, password, and location (generally composed of the server name, IP address, or wildcard. If john logs on from server1, the logon permission may be different from that of john logs on from server2.

The user structure of MySQL is user name/password/location. This does not include the database name. The following two commands set select User Permissions for database1 and database2.

GRANT select ON database1. * to 'abc' @ 'server1' identified by 'password1 ';

GRANT select ON database2. * to 'abc' @ 'server1' identified by 'password2 ';

The first command sets user abc to use password1 when connecting to database database1. The second command sets user abc to use password2 when connecting to database database2. Therefore, the passwords of user abc connecting to database database1 and database2 are different.

The above settings are very useful. If you only want users to have limited access to a database but cannot access other databases, you can set different passwords for the same user. If this is not done, it will cause trouble when the user finds that the user name can access other databases.

MySQL uses many authorization tables to track different permissions of users and these users. These tables are MyISAM tables in the mysql database. It is very meaningful to save the Security Information in MySQL. Therefore, we can use standard SQL to set different permissions.

Generally, three different types of security checks can be used in MySQL databases:

Logon Verification

That is, the most common user name and password verification. Once you enter the correct user name and password, the verification will pass.

Authorization

After successful login, you need to set specific permissions for this user. For example, whether tables in the database can be deleted.

The steps described above can be used to complete the network security defense measures of the MySQL database and ensure the data security of the MySQL database. I hope the content mentioned above will be helpful to you.

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.