The MySQL PDO must be connected without the dbname in its dsn because the db being created does not exist yet.

Tested MySQL Server version 5.5.21.
This commit is contained in:
Tero Kaisti 2012-06-06 22:24:03 +03:00
parent bd4c79dd21
commit b4475d27fb

View file

@ -82,8 +82,8 @@ class DatabaseCreateCommand extends AbstractCommand
$dbName = $this->parseDbName($config['connection']['dsn']);
$config['connection']['dsn'] = preg_replace(
'#dbname='.$dbName.'#',
'dbname='.strtolower($config['adapter']),
'#dbname='.$dbName.';#',
'',
$config['connection']['dsn']
);