रनटाइम कॉन्फ़िगरेशन फ़ाइल के लिए यहां एक उदाहरण दिया गया है:
$serviceContainer = Propel::getServiceContainer();
$serviceContainer->setAdapterClass($db_name, 'mysql');
$manager = new ConnectionManagerSingle();
$manager->setConfiguration(array(
'dsn' => 'mysql:host=' . $db_host . ';dbname=' . $db_name,
'user' => $db_username,
'password' => $db_password,
'options' => [
PDO::MYSQL_ATTR_SSL_KEY => '/etc/mysql/client-key.pem',
PDO::MYSQL_ATTR_SSL_CERT => '/etc/mysql/client-cert.pem',
PDO::MYSQL_ATTR_SSL_CA => '/etc/mysql/ca-cert.pem']
));
$serviceContainer->setConnectionManager('mydb', $manager);
और यहाँ प्रोपेल कॉन्फ़िग फ़ाइल के लिए एक उदाहरण है:
propel:
database:
connections:
devServer:
adapter: mysql
classname: Propel\Runtime\Connection\DebugPDO
dsn: mysql:host=myhost;dbname=mydb
user: jomedia
password: mypassword
options:
1010 : /etc/mysql-certs/client-key.pem
1011 : /etc/mysql-certs/client-cert.pem
1012 : /etc/mysql-certs/ca-cert.pem