559
Chapter 6. Security
Table of Contents
6.1. General Security Issues ...................................................................................................... 559
6.1.1. Security Guidelines .................................................................................................. 560
6.1.2. Keeping Passwords Secure ..................................................................................... 561
6.1.3. Making MySQL Secure Against Attackers ................................................................. 569
6.1.4. Security-Related
mysqld
Options and Variables ....................................................... 570
6.1.5. How to Run MySQL as a Normal User ..................................................................... 571
6.1.6. Security Issues with
LOAD DATA LOCAL
................................................................. 572
6.1.7. Client Programming Security Guidelines ................................................................... 573
6.2. The MySQL Access Privilege System .................................................................................. 574
6.2.1. Privileges Provided by MySQL ................................................................................. 575
6.2.2. Privilege System Grant Tables ................................................................................. 579
6.2.3. Specifying Account Names ....................................................................................... 583
6.2.4. Access Control, Stage 1: Connection Verification ...................................................... 585
6.2.5. Access Control, Stage 2: Request Verification ........................................................... 588
6.2.6. When Privilege Changes Take Effect ........................................................................ 590
6.2.7. Causes of Access-Denied Errors .............................................................................. 590
6.3. MySQL User Account Management ..................................................................................... 595
6.3.1. User Names and Passwords .................................................................................... 595
6.3.2. Adding User Accounts ............................................................................................. 597
6.3.3. Removing User Accounts ......................................................................................... 600
6.3.4. Setting Account Resource Limits .............................................................................. 600
6.3.5. Assigning Account Passwords .................................................................................. 602
6.3.6. Using SSL for Secure Connections .......................................................................... 603
6.3.7. Connecting to MySQL Remotely from Windows with SSH .......................................... 614
6.3.8. SQL-Based MySQL Account Activity Auditing ............................................................ 614
When thinking about security within a MySQL installation, you should consider a wide range of possible
topics and how they affect the security of your MySQL server and related applications:
• General factors that affect security. These include choosing good passwords, not granting
unnecessary privileges to users, ensuring application security by preventing SQL injections and data
corruption, and others. See
Section 6.1, “General Security Issues”
.
• Security of the installation itself. The data files, log files, and the all the application files of your
installation should be protected to ensure that they are not readable or writable by unauthorized
parties. For more information, see
Section 2.18, “Postinstallation Setup and Testing”
.
• Access control and security within the database system itself, including the users and databases
granted with access to the databases, views and stored programs in use within the database. For
more information, see
Section 6.2, “The MySQL Access Privilege System”
, and
Section 6.3, “MySQL
User Account Management”
.
• Network security of MySQL and your system. The security is related to the grants for individual
users, but you may also wish to restrict MySQL so that it is available only locally on the MySQL
server host, or to a limited set of other hosts.
• Ensure that you have adequate and appropriate backups of your database files, configuration
and log files. Also be sure that you have a recovery solution in place and test that you are able to
successfully recover the information from your backups. See
Chapter 7, Backup and Recovery
.
6.1. General Security Issues
This section describes general security issues to be aware of and what you can do to make your
MySQL installation more secure against attack or misuse. For information specifically about the access
Содержание 5.0
Страница 1: ...MySQL 5 0 Reference Manual ...
Страница 18: ...xviii ...
Страница 60: ...40 ...
Страница 396: ...376 ...
Страница 578: ...558 ...
Страница 636: ...616 ...
Страница 844: ...824 ...
Страница 1234: ...1214 ...
Страница 1426: ...MySQL Proxy Scripting 1406 The following diagram shows an overview of the classes exposed by MySQL Proxy ...
Страница 1427: ...MySQL Proxy Scripting 1407 ...
Страница 1734: ...1714 ...
Страница 1752: ...1732 ...
Страница 1783: ...Configuring Connector ODBC 1763 ...
Страница 1793: ...Connector ODBC Examples 1773 ...
Страница 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Страница 1842: ...Connector Net Installation 1822 5 Once the installation has been completed click Finish to exit the installer ...
Страница 1864: ...Connector Net Visual Studio Integration 1844 Figure 20 24 Debug Stepping Figure 20 25 Function Stepping 1 of 2 ...
Страница 2850: ...2830 ...
Страница 2854: ...2834 ...
Страница 2928: ...2908 ...
Страница 3000: ...2980 ...
Страница 3122: ...3102 ...
Страница 3126: ...3106 ...
Страница 3174: ...3154 ...
Страница 3232: ...3212 ...