PDO doesn't work

I have uploaded my web app created on CakePhp Framework.
It cannot connect to the database despite giving the correct credentials.

I checked what was written on line 184 its the PDO SQL connection.

$this->_connection = new PDO( $dsn, $config['login'], $config['password'], $flags );

I also enabled already the PDO extension in php.ini using

Despite all that I still have no luck in connecting to database.
Fixed this already.

Solution was just to simply rename the host.