This commit is contained in:
2023-08-16 16:11:56 +08:00
parent 373a1b0fed
commit 745a5820ba
+1
View File
@@ -345,6 +345,7 @@ class Connection extends Component
} else {
$options[PDO::ATTR_PERSISTENT] = false;
}
$this->logger->debug('create mysql client ' . 'mysql:dbname=' . $this->database . ';host=' . $this->cds);
$link = new PDO('mysql:dbname=' . $this->database . ';host=' . $this->cds, $this->username, $this->password, $options);
foreach ($this->attributes as $key => $attribute) {
$link->setAttribute($key, $attribute);