I have a script to query a mySQL database using PHP + PDO.
Since a while, the connection gives a strange error. I have changed NOTHING on the database, usernames, scripts or variables, but it is impossible to acces it. (It loocks as all my code is getting useless)
The error I get when I try to do a $DB-connect(); is the following one
"Error connecting database: Connection::connect(): SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)"
If someone can give me a hand to solve my problem, I will be very thankfull.
Thanks in advance,
Pedro.-
Since a while, the connection gives a strange error. I have changed NOTHING on the database, usernames, scripts or variables, but it is impossible to acces it. (It loocks as all my code is getting useless)
The error I get when I try to do a $DB-connect(); is the following one
"Error connecting database: Connection::connect(): SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)"
If someone can give me a hand to solve my problem, I will be very thankfull.
Thanks in advance,
Pedro.-