MySQL database sensitive data security protection six major measures if your current database is MySQL, there are many simple ways to help you protect system security, and significantly reduce the risk of unauthorized access to your sensitive data.
The most valuable asset of a technology-based enterprise is the product information of the customer or its database. Therefore, in such an enterprise, it is an important part of database management to protect the database from external attacks and prevent software and hardware faults.
In most cases, hardware and software faults are handled through the database backup solution. Most databases are equipped with built-in tools to automatically execute the entire process, so that the backup task does not require a lot of effort or any errors. However, it is not that easy to solve data security issues. To protect the security of sensitive data, you must ensure that external hackers cannot intrude into the system or steal or destroy information contained in the database. In fact, there is no automated way to solve this problem. On the contrary, to ensure the security of enterprise data, database administrators must work hard to set up some barriers that can prevent potential hacker intrusion.
Many database administrators have not implemented any database protection measures, but they are "tricky" and "complicated ". Although the situation is as described above, if you use MySQL, you only need some simple methods to greatly reduce the risks you face. This article lists the six preventive measures, but you can find more similar methods in the MySQL instruction manual and related forums.
Step 1: Remove wildcards from the authorization table
MySQL's access control system operates through a series of so-called Authorization tables, which allow us to define the access level of each user at the database, table, and column levels. These tables also allow administrators to grant a user universal permission (that is, always allow) or grant the table the permission to use wildcards. this is quite risky, because hackers may use a stolen account to obtain permissions to access other parts of the system. Therefore, exercise caution when assigning user permissions, ensure accuracy, and always ensure that the user's access permissions are sufficient for them to complete the task. In addition, we also need to guard against granting SUPER privileges to individual users, because this level of permissions allows users to manipulate basic server configurations and access all databases.
Tip: Use the show privileges command to display the permissions of each user account, so as to audit your authorization table and check whether the wildcard permission is used properly.
Step 2: Use a secure password
The user account can be secured only when the password is used. Therefore, the first thing you need to do when installing MySQL is to set a password for the MySQL root account (the password is blank by default ). When you block this vulnerability, the next step is to require each user account to set its own password and ensure that no password with heuristic information is easily identified, for example, birthday, user name, and letters.
Tip: enable the -- secure-auth option of MySQL to prevent users from using any old-fashioned, insecure MySQL password format.
Step 3: Check the permission of the configuration file
Many times, in order to make the server connection faster and more convenient, both individual users and server administrators store their user accounts and passwords in the MySQL per-user option file. However, the password is stored in the file in plain text format and can be easily read. Therefore, it is important to ensure that other users in the system cannot view configuration files similar to per-user and store these files in non-public areas. It is best to store the per-user configuration file in the private home directory of the user account, and set the permission to 0600 (only read and write by the root user ).
Step 4: encrypt the transmission on the client server
In the MySQL client server architecture (for any such architecture), it is very important to ensure data security when data is transmitted over the network. If client server transactions are performed in plain text (unencrypted information), hackers can easily discover and obtain sensitive information from these transmitted packets. To block this vulnerability, you can activate SSL in MySQL settings, or use security Shell utilities such as OpenSSH to create a secure encrypted channel for data. By encrypting the client server connection in this way, it is difficult for unauthorized users to read the data that is continuously transmitted through the Channel.
Step 5: disable remote access
If your users do not need to remotely access the server, you can force all MySQL connections to use UNIX socket files, this can greatly reduce the risk of cyberattacks. Set the server to start with the -- skip-networking option. in this way, the MySQL TCP/IP network connection can be blocked and no user can remotely connect to the system.
Tip: If you want to be more secure, add the bind-address = 127.0.0.1 command in MySQL server settings to forcibly bind MySQL to the IP address of the local machine, this ensures that only users of the same system can connect to MySQL.
Step 6: actively monitor MySQL access logs
MySQL has many different log files used to record client connection, query, and server errors. The most important is the general query log, which records the connection and disconnection of each client with a timestamp, and records the execution of each query by the client. If you suspect that unusual activities, such as those related to network intrusion, occur in MySQL, you are advised to monitor the log to identify the source of such activities.
Summary
The protection of the MySQL database is a constant task. once you have implemented the above protection measures, do not interrupt it easily. You can obtain