このコードを使用すると、通常、zend フレームワークを使用して mysql に接続できます。
resources.db.adapter = "Pdo_Mysql"
resources.db.params.host = "xx.xx.xx.xx"
resources.db.params.username = "test_user"
resources.db.params.password = "test_pass"
resources.db.params.dbname = "test_database"
resources.db.params.port="xxxx"
;parameters here for ssl connection??
私の中でController
:
public function indexAction() {
$config = new Zend_Config_Ini('/path/to/application.ini', 'development');
$db = Zend_Db::factory($config->resources->db);
$sql = 'SELECT * FROM test_table';
$result = $db->fetchAll($sql);
echo '<pre>';
print_r($result);
}
問題は、 sslを使用して mysql に接続したいということですが、その方法に関するドキュメントは見つかりませんでした。
次のようにssl接続を構成することにより、データベース管理者の助けを借りて、Navicatを使用してサーバーに接続することができました。
問題は、php を使用して接続する方法ですか?