0

I'm updating a site that I know has mySQL running, and I've installed a page that runs a MySQL query in the same form that the other, working queries on the page run. Everything works locally, but on the live server I get a

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) 

error although I know sql is running, and other pages are successfully running queries on the same database/table with the same query syntax. I don't have access to the root of the server, and shouldn't have to restart anything because I know mysql is running right? Thanks a lot for suggestions

phillydigital
  • 193
  • 1
  • 11
  • Is there a difference in configuration on local vs live? – Naruto Nov 04 '15 at 08:48
  • 1
    Possible duplicate of [Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)](http://stackoverflow.com/questions/5376427/cant-connect-to-local-mysql-server-through-socket-var-mysql-mysql-sock-38) – Alex Andrei Nov 04 '15 at 08:48
  • I don't think it can be a configuration issue because other code/queries in the same update are successfully running queries from same DB/table. I wonder if its a permission issue or if maybe I'm trying to run a duplicate query or something? This is my first program using php/mysql like this thanks for the help – phillydigital Nov 04 '15 at 09:00
  • " I wonder if its a permission issue or if maybe I'm trying to run a duplicate query or something?" No, the error message is quite unambigious. If it is a "permission problem" then it's because /var/lib/mysql/mysql.sock is inaccessible. – VolkerK Nov 04 '15 at 09:02
  • But how do I troubleshoot this if I don't have access to the server root, and please understand that the *site is successfully serving other queries with the same parameters* thank you – phillydigital Nov 04 '15 at 09:05

0 Answers0