HubsInfo Network
You're browsing our forum as a Guest meaning you can only see a portion of the forum in read-only mode. To view all forum nodes and be able to create threads/posts please register or log-in.
PHP MySQL Linux Material Design Web Hosting Online Games SimCity BuildIt

Connect to an external MySQL server with PDO (without delay)

0 Members and 1 Guest are viewing this topic.

Add one space between mysql: and host (server IP address or dns name)
ex: "mysql: "

Code: [Select]
$conn = new PDO('mysql:host=;dbname=test_db;port=3306','username','password');

it will fail no matter what. However if you put a space between mysql: and host like this:

$conn = new PDO('mysql: host=;dbname=test_db;port=3306','username','password');


Linux Ubuntu Guides Linux games -