Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2007
    Posts
    25
    Plugin Contributions
    0

    Default mysql.sock problem

    I'm doing a new install and I'm see the below error on the database set-up screen

    Connection to Database failed
    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

    I'm using localhost for the database host (I've contacted my hosting company to confirm this) but I've read a tread about the above problem but it didn't seem to offer a solution.

    I've run php info and my MYSQL_SOCKET path is /var/lib/mysql/mysql.sock is this the problem and if so what should it be and how can I change this?

    I'd appreciate any help or ideas please

    Cheers
    Lee

  2. #2
    Join Date
    Nov 2004
    Location
    Norfolk, United Kingdom
    Posts
    3,036
    Plugin Contributions
    2

    Default Re: mysql.sock problem

    Best to wait until your hosts get back to you with confirmation about what the correct setting is for db_server. Usually it's 'localhost' or '127.0.0.1' (the ip address of localhost), but it can be the ip address of the mysql server.

    Vger

  3. #3
    Join Date
    Oct 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: mysql.sock problem

    Still waiting on the hosting company to get back to me (they are crap at support, aren't they all....!)

    I'd of expected localhost to work like you said, am I right in thinking if the MYSQL_SOCKET path is for some reason incorrect the only fix is server side?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: mysql.sock problem

    Quote Originally Posted by lbooth View Post
    Still waiting on the hosting company to get back to me (they are crap at support, aren't they all....!)
    No, some are actually excellent.
    You might try out some suggested hosts by clicking the link entitled "hosting" at the top of this page.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: mysql.sock problem

    Quote Originally Posted by lbooth View Post
    Connection to Database failed
    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
    This is usually a result of a server configuration issue ...
    ie: it generally seems to show up when the server is set to listen only on one protocol (sockets instead of tcp) and the PHP client/connector installed in PHP is only sending via a different protocol (ie: tcp instead of sockets).

    Sorry, I can't tell you how to fix that. It would seem to be a server-side problem and not something you can deal with by changing programming code.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 4
    Last Post: 13 Dec 2014, 04:48 AM
  2. MySQL migrate problem
    By visua in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 25 Mar 2009, 10:35 AM
  3. MySQL Problem
    By bgroup99 in forum General Questions
    Replies: 4
    Last Post: 26 Oct 2006, 09:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg