Security solutions in MySQL database

Source: Internet
Author: User
Tags mysql account security access mysql database

   With the popularization of network, more and more web-based applications are used. The network database is one of them. Through one or several servers can provide services for many customers, this way to bring people a lot of convenience, but also to the outlaws created an opportunity. Because the data is transmitted over the network, this can be intercepted in the process of transmission, or through the very means of access to the database. Because of the above reasons, database security is very important. Therefore, this paper discusses some functions of MySQL database in network security.

  account Security

The account is the simplest security measure for MySQL. Each account consists of a user name, a password, and a location (typically a server name, IP, or wildcard character). If user John logs on from Server1, it may be different from John's permission to log on from Server2.

MySQL's user structure is username/password/location. This does not include the name of the database. The following two commands set the Select User rights 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 the user ABC to use PASSWORD1 when connecting to the database Database1. The second command sets the user ABC to use PASSWORD2 when connecting to the database Database2. As a result, user ABC has a different password to connect to the database Database1 and Database2.

The settings above are very useful. If you only want users to have limited access to one database and not access to other databases, you can set a different password for the same user. If this is not done, it can cause problems when the user discovers that the user name has access to other databases.

MySQL uses a number of authorization tables to track the different permissions of users and those users. These tables are the MyISAM tables in the MySQL database. It makes sense to keep these security messages in MySQL. Therefore, we can use standard SQL to set different permissions.

3 different types of security checks are generally available in the MySQL database:

• Login Verification

This is the most common user name and password validation. Once you have typed in the correct username and password, this validation is available.

• Authorization

After the login is successful, the user is required to set its specific permissions. If you can delete tables in the database, and so on.

• Access Control

This security type is more specific. It involves what the user can do with the datasheet, such as whether the database can be edited, whether data can be queried, and so on.

1 2 3 4 Next > Full text reading tips: Try the "←→" button, turn the page more convenient Oh!

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.