The following articles mainly describe the actual operation steps for configuring SSL in MySQL and the code to be used in actual operations. If you are interested in the actual operation process, you can browse the following articles. I hope you will gain some benefits after browsing them.
- [client]
- ssl-ca=$DIR/cacert.pem
- ssl-cert=$DIR/client-cert.pem
- ssl-key=$DIR/client-key.pem
- [MySQLd]
- ssl-ca=$DIR/cacert.pem
- ssl-cert=$DIR/server-cert.pem
- ssl-key=$DIR/server-key.pem
Test and start MySQL
$ DIR is the path of the Option file my. cnf
- shell> MySQLd --defaults-file=$DIR/my.cnf &
- Then invoke a client program using the same option file:
- shell> MySQL --defaults-file=$DIR/my.cnf
- [root@localhost MySQL-5.0.20a]# chown -R root /usr/local/MySQL
- [root@localhost MySQL-5.0.20a]# chown -R MySQL /usr/local/MySQL/var
- [root@localhost MySQL-5.0.20a]# chgrp -R MySQL /usr/local/MySQL
- [root@localhost MySQL-5.0.20a]# /usr/local/MySQL/bin/MySQLd_safe --user=MySQL &
- [root@localhost MySQL]# ./bin/MySQL -u root --socket=/tmp/MySQL.sock
-
For a service, you only need to put MySQL/share/MySQL. server under/etc/init. d/and change it to MySQL.
- [root@localhost MySQL]# chmod 775 /etc/init.d/MySQL
- [root@localhost MySQL]# chkconfig --add MySQL
- MySQL> grant all privileges on mydb.* to 'admin'@'%' Identified by '123456';
- grant all privileges on mydb2.* to 'd_admin'@'%' Identified by '123456';
- GRANT ALL PRIVILEGES ON mydb2.* TO 'bodd'@'192.168.18.14' IDENTIFIED BY 'domainssl' REQUIRE SSL;
- flush PRIVILEGES;
Original article title: Configuring SSL for MySQL
Connection: http://www.cnblogs.com/huqingyu/archive/2010/05/15/1736004.html
The above content is an introduction to configuring SSL for MySQL. I hope you will gain some benefits.