Set mysql host to % instead of localhost to allow connections to 127.0.0.1

Note, for updating an existing database, you should run the following:
UPDATE mysql.user SET host='%'; FLUSH PRIVILEGES;
This commit is contained in:
Daniel Winzen
2017-12-21 20:26:24 +01:00
parent 779c7bdaea
commit c65055a9bb
2 changed files with 3 additions and 3 deletions

View File

@ -148,7 +148,7 @@ foreach($onions as $onion){
//delete all log files
exec("rm -f /var/log/nginx/*$onion[0].onion.log*");
//delete user from database
$db->exec("DROP USER '$onion[0].onion'@'localhost';");
$db->exec("DROP USER '$onion[0].onion'@'%';");
$db->exec("DROP DATABASE IF EXISTS `$onion[0]`;");
$db->exec('FLUSH PRIVILEGES;');
//delete user from user database