The actual Procedure and Code for configuring SSL in MySQL

Source: Internet
Author: User

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.

 
 
  1. [client]  
  2. ssl-ca=$DIR/cacert.pem  
  3. ssl-cert=$DIR/client-cert.pem  
  4. ssl-key=$DIR/client-key.pem  
  5. [MySQLd]  
  6. ssl-ca=$DIR/cacert.pem  
  7. ssl-cert=$DIR/server-cert.pem  
  8. ssl-key=$DIR/server-key.pem 

Test and start MySQL

$ DIR is the path of the Option file my. cnf

 
 
  1. shell> MySQLd --defaults-file=$DIR/my.cnf &  
  2. Then invoke a client program using the same option file:   
  3. shell> MySQL --defaults-file=$DIR/my.cnf  
  4. [root@localhost MySQL-5.0.20a]# chown -R root /usr/local/MySQL  
  5. [root@localhost MySQL-5.0.20a]# chown -R MySQL /usr/local/MySQL/var  
  6. [root@localhost MySQL-5.0.20a]# chgrp -R MySQL /usr/local/MySQL  
  7. [root@localhost MySQL-5.0.20a]# /usr/local/MySQL/bin/MySQLd_safe --user=MySQL &  
  8. [root@localhost MySQL]# ./bin/MySQL -u root --socket=/tmp/MySQL.sock  
  9.  

For a service, you only need to put MySQL/share/MySQL. server under/etc/init. d/and change it to MySQL.

 
 
  1. [root@localhost MySQL]# chmod 775 /etc/init.d/MySQL  
  2. [root@localhost MySQL]# chkconfig --add MySQL  
  3. MySQL> grant all privileges on mydb.* to 'admin'@'%' Identified by '123456';  
  4. grant all privileges on mydb2.* to 'd_admin'@'%' Identified by '123456';  
  5. GRANT ALL PRIVILEGES ON mydb2.* TO 'bodd'@'192.168.18.14' IDENTIFIED BY 'domainssl' REQUIRE SSL;  
  6. 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.