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:
parent
bd4c79dd21
commit
b4475d27fb
|
@ -82,8 +82,8 @@ class DatabaseCreateCommand extends AbstractCommand
|
||||||
$dbName = $this->parseDbName($config['connection']['dsn']);
|
$dbName = $this->parseDbName($config['connection']['dsn']);
|
||||||
|
|
||||||
$config['connection']['dsn'] = preg_replace(
|
$config['connection']['dsn'] = preg_replace(
|
||||||
'#dbname='.$dbName.'#',
|
'#dbname='.$dbName.';#',
|
||||||
'dbname='.strtolower($config['adapter']),
|
'',
|
||||||
$config['connection']['dsn']
|
$config['connection']['dsn']
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue