diff --git a/src/N98/Magento/Command/Installer/InstallCommand.php b/src/N98/Magento/Command/Installer/InstallCommand.php index b42411318..7c251955f 100644 --- a/src/N98/Magento/Command/Installer/InstallCommand.php +++ b/src/N98/Magento/Command/Installer/InstallCommand.php @@ -515,10 +515,10 @@ protected function validateDatabaseSettings(OutputInterface $output, InputInterf try { $dsn = sprintf("mysql:host=%s;port=%s", $this->config['db_host'], $this->config['db_port']); $db = new PDO($dsn, $this->config['db_user'], $this->config['db_pass']); - if (!$db->query('USE ' . $this->config['db_name'])) { + if (!$db->query("USE `" . $this->config['db_name'] . "`")) { $db->query("CREATE DATABASE `" . $this->config['db_name'] . "`"); $output->writeln('Created database ' . $this->config['db_name'] . ''); - $db->query('USE ' . $this->config['db_name']); + $db->query("USE `" . $this->config['db_name'] . "`"); return $db; }