Questions about ZendFrameworkPHP accessing MYSQL through ssl

Source: Internet
Author: User
About ZendFrameworkPHP accessing MYSQL through ssl zendstudio8.0php5.3.8 & nbsp; mysql5.1.58 database access configuration resources. db. runtime about Zend Framework PHP accessing MYSQL through ssl
Zend studio8.0
Php 5.3.8
Mysql 5.1.58

Database access configuration
Resources. db. adapter = PDO_MYSQL
Resources. db. params. host = 192.168.1.12
Resources. db. params. username = root
Resources. db. params. password = 123456
Resources. db. params. dbname = testdb

Ssl is successfully configured for the database.
You can access the database in the ssl mode of Navicat.

How can I configure zend to access the database?

------ Solution --------------------
It seems that configuring the database in zend is useless. what do you want him to do for you? what can he do for you?
------ Solution --------------------
There is a post about connecting to mysql through ssl.
Zend should be the same. The key is to allow mysql to support ssl.
Refer:
Http://hi.baidu.com/freeners/blog/item/ab950513a5efe70c4a90a78c.html
------ Solution --------------------
Discussion

MYSQL supports ssl

The prompt is: Navicat can access the database in ssl mode.

Now the key is that the php script does not know how to write it to connect to mysql through ssl.

------ Solution --------------------
Http://www.php.net/manual/en/function.mysql-connect.php#77000

Http://php.net/manual/en/mysqli.ssl-set.php

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.