Yeah,
I have the following error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2005] Unknown MySQL server host '127.0.0.1:3306' (11001)' in C:\xampp\htdocs\php.php:5 Stack trace: #0 C:\xampp\htdocs\php.php(5): PDO->__construct('mysql:host=127....', 'root', 'pass') #1 {main} thrown in C:\xampp\htdocs\php.php on line 5
php.php contains the following:
error_reporting(E_ALL);
ini_set('display_errors', 1);
/* Database Setting */
$db['host'] = '127.0.0.1'; //Mysql's Host
$db['port'] = '3306'; //Mysql's port
$db['user'] = "root"; //Mysql's user
$db['pass'] = 'pass'; //Mysql's password
$db['db'] = "db"; //Mysql's database
$dbh = new PDO('mysql:host='.$db['host'].':'.$db['port'].';dbname='.$db['db'].'', $db['user'], $db['pass']);
I found some other posts but those were with the same error but then with localhost
instead of 127.0.0.1
its really weird, can you guys please help me out?
Thanks!