Creating SSL and RSA Certificates and Keys 1304 5. Press OK 3 times. 6. Check that OpenSSL was correctly integrated into the Path variable by opening a new command console ( Start>Run>cmd.exe ) and verifying that OpenSSL is available: 6.3.3.3 Creating RSA Keys Using openssl After OpenSSL has been installed, use instructions similar to those from Example 1 (shown earlier in this section), with the following changes: On Windows, use these commands instead: After generating the certificate and key files, to use them for SSL connections, see Section 6.3.1, “Configuring MySQL to Use Encrypted Connections” . This section describes how to use the  openssl  command to set up the RSA key files that enable MySQL to support secure password exchange over unencrypted connections for accounts authenticated by the sha256_password  and  caching_sha2_password  plugins. There are easier alternatives to generating the files required for RSA than the procedure described here: Let the server autogenerate them or use the mysql_ssl_rsa_setup  program. See Section 6.3.3.1, “Creating SSL and RSA Certificates and Keys using MySQL” . To create the RSA private and public key-pair files, run these commands while logged into the system account used to run the MySQL server so that the files are owned by that account: Those commands create 2,048-bit keys. To create stronger keys, use a larger value. Then set the access modes for the key files. The private key should be readable only by the server, whereas the public key can be freely distributed to client users: openssl genrsa -out private_key.pem 2048 openssl rsa -in private_key.pem -pubout -out public_key.pem chmod 400 private_key.pem chmod 444 public_key.pem # Create clean environment md c:
ewcerts cd c:
ewcerts # Create clean environment rm -rf newcerts mkdir newcerts && cd newcerts •Change the following Unix commands: •When a  ’\’  character is shown at the end of a command line, this  ’\’  character must be removed and the command lines entered all on a single line. Note Microsoft Windows [Version ...] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\Windows\system32> cd \ C:\> openssl OpenSSL>  exit  <<< If you see the OpenSSL prompt, installation was successful. C:\>