mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
mysql set localhost and update grant on setup tests
This commit is contained in:
@@ -64,11 +64,15 @@ class SetupTestsDbs extends Command
|
|||||||
$db_name = StringHelper::SqlQuote($settings['database']['db_name'], StringHelper::SQL_IDENTIFIER);
|
$db_name = StringHelper::SqlQuote($settings['database']['db_name'], StringHelper::SQL_IDENTIFIER);
|
||||||
|
|
||||||
$this->container['orm.em']->getConnection()->executeUpdate(
|
$this->container['orm.em']->getConnection()->executeUpdate(
|
||||||
'GRANT ALL PRIVILEGES ON '.$ab_name.'.* TO '.$user.'@'.$host.' IDENTIFIED BY '.$pass.' WITH GRANT OPTION'
|
'CREATE USER '.$user.'@'.$host.' IDENTIFIED WITH mysql_native_password BY '.$pass.' WITH GRANT OPTION'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->container['orm.em']->getConnection()->executeUpdate(
|
$this->container['orm.em']->getConnection()->executeUpdate(
|
||||||
'GRANT ALL PRIVILEGES ON '.$db_name.'.* TO '.$user.'@'.$host.' IDENTIFIED BY '.$pass.' WITH GRANT OPTION'
|
'GRANT ALL PRIVILEGES ON '.$ab_name.'.* TO '.$user.'@'.$host.' WITH GRANT OPTION'
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->container['orm.em']->getConnection()->executeUpdate(
|
||||||
|
'GRANT ALL PRIVILEGES ON '.$db_name.'.* TO '.$user.'@'.$host.' WITH GRANT OPTION'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->container['orm.em']->getConnection()->executeUpdate('SET @@global.sql_mode= ""');
|
$this->container['orm.em']->getConnection()->executeUpdate('SET @@global.sql_mode= ""');
|
||||||
|
Reference in New Issue
Block a user