MySQL 8.0 Reference Manual 5.7.1 Installing and Uninstalling Loadable Functions ....................................................... 1144 5.7.2 Obtaining Information About Loadable Functions ................................................... 1145 5.8 Running Multiple MySQL Instances on One Machine ........................................................ 1146 5.8.1 Setting Up Multiple Data Directories ...................................................................... 1147 5.8.2 Running Multiple MySQL Instances on Windows .................................................... 1148 5.8.3 Running Multiple MySQL Instances on Unix .......................................................... 1151 5.8.4 Using Client Programs in a Multiple-Server Environment ........................................ 1152 5.9 Debugging MySQL .......................................................................................................... 1153 5.9.1 Debugging a MySQL Server ................................................................................. 1153 5.9.2 Debugging a MySQL Client .................................................................................. 1159 5.9.3 The LOCK_ORDER Tool ...................................................................................... 1159 5.9.4 The DBUG Package ............................................................................................. 1165 6 Security ..................................................................................................................................... 1169 6.1 General Security Issues .................................................................................................. 1170 6.1.1 Security Guidelines .............................................................................................. 1171 6.1.2 Keeping Passwords Secure .................................................................................. 1172 6.1.3 Making MySQL Secure Against Attackers .............................................................. 1175 6.1.4 Security-Related mysqld Options and Variables ..................................................... 1177 6.1.5 How to Run MySQL as a Normal User .................................................................. 1177 6.1.6 Security Considerations for LOAD DATA LOCAL ................................................... 1178 6.1.7 Client Programming Security Guidelines ................................................................ 1182 6.2 Access Control and Account Management ....................................................................... 1184 6.2.1 Account User Names and Passwords ................................................................... 1185 6.2.2 Privileges Provided by MySQL .............................................................................. 1186 6.2.3 Grant Tables ........................................................................................................ 1204 6.2.4 Specifying Account Names ................................................................................... 1214 6.2.5 Specifying Role Names ........................................................................................ 1216 6.2.6 Access Control, Stage 1: Connection Verification ................................................... 1216 6.2.7 Access Control, Stage 2: Request Verification ....................................................... 1220 6.2.8 Adding Accounts, Assigning Privileges, and Dropping Accounts .............................. 1222 6.2.9 Reserved Accounts .............................................................................................. 1225 6.2.10 Using Roles ....................................................................................................... 1226 6.2.11 Account Categories ............................................................................................ 1233 6.2.12 Privilege Restriction Using Partial Revokes .......................................................... 1236 6.2.13 When Privilege Changes Take Effect .................................................................. 1243 6.2.14 Assigning Account Passwords ............................................................................ 1243 6.2.15 Password Management ...................................................................................... 1245 6.2.16 Server Handling of Expired Passwords ................................................................ 1256 6.2.17 Pluggable Authentication .................................................................................... 1258 6.2.18 Proxy Users ....................................................................................................... 1263 6.2.19 Account Locking ................................................................................................. 1271 6.2.20 Setting Account Resource Limits ......................................................................... 1272 6.2.21 Troubleshooting Problems Connecting to MySQL ................................................. 1274 6.2.22 SQL-Based Account Activity Auditing .................................................................. 1279 6.3 Using Encrypted Connections .......................................................................................... 1280 6.3.1 Configuring MySQL to Use Encrypted Connections ................................................ 1281 6.3.2 Encrypted Connection TLS Protocols and Ciphers ................................................. 1288 6.3.3 Creating SSL and RSA Certificates and Keys ........................................................ 1296 6.3.4 Connecting to MySQL Remotely from Windows with SSH ...................................... 1305 6.4 Security Components and Plugins ................................................................................... 1305 6.4.1 Authentication Plugins .......................................................................................... 1306 6.4.2 The Connection-Control Plugins ............................................................................ 1378 6.4.3 The Password Validation Component .................................................................... 1384 6.4.4 The MySQL Keyring ............................................................................................. 1397 vii