0

Hi need some assistance here im having an error connecting my database to the server online,the thing is it is working fine in localhost but when i uploaded it just wont work.. i already change the necessary string to match the server configuration online

from config.php this is in the localhost

<?php
    define('DB_HOST', 'localhost');
    define('DB_USER', 'root');
    define('DB_PASSWORD', '');
    define('DB_DATABASE', 'subscribe');
?>

to config.php thisis on the server

<?php
    define('DB_HOST', 'localhost');
    define('DB_USER', 'xxxx');
    define('DB_PASSWORD', 'xxx');
    define('DB_DATABASE', 'xxxx');
?>

but still having this error

Failed to connect to server: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

all suggestion are welcome thanks and if you want the complete code i can post it

1
Contributor
1
Reply
4
Views
5 Years
Discussion Span
Last Post by ehpratah
0

Got it..some of the hosting site generate their own code on how to connect to the server now i know..:)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.