Skip to content

Commit

Permalink
Use localhost instead of 127.0.0.1 for localhost user
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Feb 18, 2016
1 parent b71d7bc commit 0ea624e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion install/class.create_db.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static function import_file($filename) {
}
}
//Connection::$db->commit();
$Connection->db = null;
return '';
}

Expand All @@ -50,7 +51,7 @@ public static function create_database($root,$root_pass,$user,$pass,$db,$db_type
// Dirty hack
if ($host != 'localhost' || $host != '127.0.0.1') {
$grantright = $_SERVER['SERVER_ADDR'];
} else $grantright = $host;
} else $grantright = 'localhost';
try {
$dbh = new PDO($db_type.':host='.$host,$root,$root_pass);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
Expand Down

0 comments on commit 0ea624e

Please sign in to comment.