Database problem

Permalink 1 user found helpful
Have download Version and when i install, this error:
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I am not running my ḿySQL on a localhost, i run at different server

View Replies:
pichan replied on at Permalink Reply
Similar problem here (as well on a remote server). The installation stops with "SQLSTATE[HY000] [2002] No such file or directory".
ErikGebers replied on at Permalink Reply
Hi, I just posted an answer to that on another thread:

Good luck!
peterdenk replied on at Permalink Reply
Same problem too. Running c5 in a hosted environment with db on a different server.
ErikGebers2 replied on at Permalink Reply
I gave a try and got the same problem again. Yet I managed to get this version installed and working hardcoding the DB connexion directly:
in the file 'concrete5.7.0.3/concrete/src/Database/Connection/PDOConnection.php'
In the __construct, I added as first line of the method:
$dsn = 'mysql:host=MY_SERVER;dbname=MY_DB';

So I kept for the other fixes, a pity that the problem is not fixed yet as it was not present in
dbleisch replied on at Permalink Reply
Found and resolved teh Problem

Fixed it by changing the variables name in :

36 if (isset($params['server']) && $params['server'] != '') {
37 $dsn .= 'host=' . $params['host'] . ';';
38 }


36 if (isset($params['host']) && $params['host'] != '') {
37 $dsn .= 'host=' . $params['host'] . ';';
38 }
evka replied on at Permalink Reply
Modifying php.ini with the correct socket information worked for me.