以下的文章主要向大家描述的是MySQL配置SSL的实际操作步骤与其实际操作中要用到的代码的描述,假如你对其实际操作流程有兴趣了解的话,你就可以浏览以下的文章了,望你在浏览之后会对其有所收获。
- [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
测试启动MySQL
$DIR 是选项文件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
对于设置为服务只要把MySQL/share/MySQL/MySQL.server放到/etc/init.d/下改名为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;
原文标题:MySQL配置SSL
连接:http://www.cnblogs.com/huqingyu/archive/2010/05/15/1736004.html
以上的相关内容就是对MySQL配置SSL的介绍,望你能有所收获。
【编辑推荐】