Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2018
    Posts
    146
    Plugin Contributions
    0

    Default mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket

    Hi

    My website is currently down andte error in logs is:

    "[14-May-2018 09:17:12 Europe/London] PHP Warning: mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /web/sites/mas-uk.com/wwwroot/****/includes/classes/db/mysql/query_factory.php on line 65"

    Line 65 is "$this->link = mysqli_connect($zf_host, $zf_user, $zf_password, $zf_database, (defined('DB_PORT') ? DB_PORT : NULL), (defined('DB_SOCKET') ? DB_SOCKET : NULL));"

    Any help is greatly appreicated.

  2. #2
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: URGENT help needed

    It looks like your SQL server is down. You should probably contact your host.

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: URGENT help needed

    Also when checking for the server being "down" confirm that the correct database information is provided. While I recently had a similar problem thinking I had updated the database server link, I hadn't but the error was also a little different. Database information is located in includes/configure.php.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jan 2018
    Posts
    146
    Plugin Contributions
    0

    Default Re: URGENT help needed

    Hi,

    The people that look after our MySQL sorted this but it keeps happening every week and then they fix it easily, but its becoming an anoyng reoccurence. How can i fix this or what could the problem be that keeps crashing MySQL?

    The error is: [29-May-2018 09:12:29 Europe/London] PHP Warning: mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /web/sites/mas-uk.com/wwwroot/****/*****/classes/db/mysql/query_factory.php on line 65

    Name:  Screenshot_80.jpg
Views: 314
Size:  18.3 KB

  5. #5
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: URGENT help needed

    If your hoster can't fix the problem, it is time to find a better/new hoster. It is not a zen cart problem.
    Quote Originally Posted by JakeLawless View Post
    Hi,

    The people that look after our MySQL sorted this but it keeps happening every week and then they fix it easily, but its becoming an anoyng reoccurence. How can i fix this or what could the problem be that keeps crashing MySQL?

    The error is: [29-May-2018 09:12:29 Europe/London] PHP Warning: mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /web/sites/mas-uk.com/wwwroot/****/*****/classes/db/mysql/query_factory.php on line 65

    Name:  Screenshot_80.jpg
Views: 314
Size:  18.3 KB

  6. #6
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,682
    Plugin Contributions
    9

    Default Re: URGENT help needed

    you need to be on a server with more resources. your site is competing for limited resources, and your site is losing....

    good luck.
    author of square Webpay.
    mxWorks has premium plugins. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  7. #7
    Join Date
    Jan 2018
    Posts
    146
    Plugin Contributions
    0

    Default Re: URGENT help needed

    What do you mean by this?

    Thanks

  8. #8
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: URGENT help needed

    He means that your sql server needs to work harder than it can. The consequence is that the server crashes and needs to be rebooted. The solution is for your host to assign you to a "better" server

 

 

Similar Threads

  1. v154 mysqli_connect(): (HY000/2002): No such file or directory
    By adb34 in forum General Questions
    Replies: 24
    Last Post: 16 Aug 2020, 02:38 PM
  2. Replies: 30
    Last Post: 15 Apr 2016, 10:36 PM
  3. Replies: 10
    Last Post: 11 Feb 2016, 10:30 PM
  4. Replies: 4
    Last Post: 13 Dec 2014, 04:48 AM
  5. Replies: 1
    Last Post: 10 May 2010, 05:29 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR