Page 1 of 4 123 ... LastLast
Results 1 to 10 of 31
  1. #1
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

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

    myDEBUG logs began last night @ 11:03pm. Below is the contents of the first myDEBUG file. Many, many others. slightly different filesizes.
    This is way over my head, so any suggestings greatly appreciated.

    I am guessing something changed by host since I was in bed at that time.

    First indication from host is "Mysql is up and running fine in your server"

    ZC1.5.4
    upgraded from zc1.5.3 several weeks ago

    Code:
    [01-Aug-2015 23:03:46 America/Los_Angeles] #1  mysqli_connect(localhost, DBnameREMOVED, DBpasswordREMOVED) called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect(localhost, DBnameREMOVED, DBpasswordREMOVED, DBnameREMOVED, false, ) called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
    
    [01-Aug-2015 23:03:46 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [01-Aug-2015 23:03:46 America/Los_Angeles] #1  mysqli_connect(localhost, DBnameREMOVED, DBpasswordREMOVED) called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect(localhost, DBnameREMOVED, DBpasswordREMOVED, DBnameREMOVED, false, ) called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
    
    [01-Aug-2015 23:03:46 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [01-Aug-2015 23:03:46 America/Los_Angeles] #1  mysqli_connect(localhost, DBnameREMOVED, DBpasswordREMOVED) called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect(localhost, DBnameREMOVED, DBpasswordREMOVED, DBnameREMOVED, false, ) called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
    
    [01-Aug-2015 23:03:46 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [01-Aug-2015 23:03:46 America/Los_Angeles] #1  mysqli_connect(localhost, DBnameREMOVED, DBpasswordREMOVED) called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect(localhost, DBnameREMOVED, DBpasswordREMOVED, DBnameREMOVED, false, ) called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
    
    [01-Aug-2015 23:03:46 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [01-Aug-2015 23:03:46 America/Los_Angeles] #1  mysqli_connect(localhost, DBnameREMOVED, DBpasswordREMOVED) called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect(localhost, DBnameREMOVED, DBpasswordREMOVED, DBnameREMOVED, false, ) called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
    
    [01-Aug-2015 23:03:46 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [01-Aug-2015 23:03:46 America/Los_Angeles] #1  mysqli_connect(localhost, DBnameREMOVED, DBpasswordREMOVED) called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect(localhost, DBnameREMOVED, DBpasswordREMOVED, DBnameREMOVED, false, ) called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
    
    [01-Aug-2015 23:03:46 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [01-Aug-2015 23:03:46 America/Los_Angeles] #1  mysqli_connect(localhost, DBnameREMOVED, DBpasswordREMOVED) called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect(localhost, DBnameREMOVED, DBpasswordREMOVED, DBnameREMOVED, false, ) called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
    
    [01-Aug-2015 23:03:46 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [01-Aug-2015 23:03:46 America/Los_Angeles] #1  mysqli_connect(localhost, DBnameREMOVED, DBpasswordREMOVED) called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect(localhost, DBnameREMOVED, DBpasswordREMOVED, DBnameREMOVED, false, ) called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
    
    [01-Aug-2015 23:03:46 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [01-Aug-2015 23:03:46 America/Los_Angeles] #1  mysqli_connect(localhost, DBnameREMOVED, DBpasswordREMOVED) called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect(localhost, DBnameREMOVED, DBpasswordREMOVED, DBnameREMOVED, false, ) called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
    
    [01-Aug-2015 23:03:46 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    [01-Aug-2015 23:03:46 America/Los_Angeles] #1  mysqli_connect(localhost, DBnameREMOVED, DBpasswordREMOVED) called at [/home/chainwea/public_html/includes/classes/db/mysql/query_factory.php:62]
    #2  queryFactory->connect(localhost, DBnameREMOVED, DBpasswordREMOVED, DBnameREMOVED, false, ) called at [/home/chainwea/public_html/includes/init_includes/init_database.php:23]
    #3  require(/home/chainwea/public_html/includes/init_includes/init_database.php) called at [/home/chainwea/public_html/includes/autoload_func.php:48]
    #4  require(/home/chainwea/public_html/includes/autoload_func.php) called at [/home/chainwea/public_html/includes/application_top.php:158]
    #5  require(/home/chainwea/public_html/includes/application_top.php) called at [/home/chainwea/public_html/index.php:26]
    
    [01-Aug-2015 23:03:46 America/Los_Angeles] PHP Warning:  mysqli_connect(): (HY000/2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/chainwea/public_html/includes/classes/db/mysql/query_factory.php on line 62
    Last edited by RixStix; 2 Aug 2015 at 03:10 PM.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  2. #2
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: myDEBUG files Public down: Admin OK

    Not sure what caused the problem but it magically fixed itself instantly when host 'repaired' the database.
    The issue began surprisingly at the exact time the host restarted the mySQL server last nite for an undisclosed reason.

    Only 1000+ myDEBUG files later..... and a plethora of grumpy customer emails this morning.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: myDEBUG files Public down: Admin OK

    Darn, it sure would have been "interesting" to see the before and after databases! Do you have any idea what "repair" was performed?

  4. #4
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: myDEBUG files Public down: Admin OK

    The repair was a one-click "Repair" action from within cpanel.


    • I am waiting to see if the host has a DB backup from between 11:03pm PDT last night and the one-click repair.
    • I have a backup made shortly after the repair.
    • I also have a backup made yesterday morning.


    Coincidently, the mySQL server was restarted last night at 11:03pm, the exact time that the myDEBUG logs began. The log above was the first one. The files afterwards are slightly different, smaller in size but I didn't bother looking at the details other than I saw references to whosonline.php in them. I don't mind looking if you're interested.

    The only thing presented to website visitors was a white screen containing ....
    WARNING: An Error occurred, please refresh the page and try again.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: myDEBUG files Public down: Admin OK

    If your host can find such a backup and you're willing to share the before/after database contents, let me know via PM and I'll run a "diff" between the two versions and report back.

  6. #6
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: myDEBUG files Public down: Admin OK

    I think I have before and after.

    Darn Windows10 is not being cooperative. Seems to be hiding files that I know exist and that can be seen by my ftp program. I'll let you know when/if I find them.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: myDEBUG files Public down: Admin OK

    Quote Originally Posted by RixStix View Post
    Coincidently, the mySQL server was restarted last night at 11:03pm, the exact time that the myDEBUG logs began. The log above was the first one.
    The timing is revealing. It could easily be that when the MySQL server was restarted it corrupted some data somehow. Perhaps a consequence of the hosting company doing software upgrades that went badly. If they're willing to admit it I suspect they probably had to "repair" everybody else's database on the same server too.
    .

    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.

  8. #8
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: myDEBUG files Public down: Admin OK

    That's what I suspected. They have been working to upgrade all their VPS for a while and inspite of testing, they are still working minor bugs.

    I didn't get to grab a DB backup from the interim timeslot. Not that it would make much difference.
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  9. #9
    Join Date
    Aug 2009
    Location
    North Idaho, USA
    Posts
    2,008
    Plugin Contributions
    1

    Default Re: myDEBUG files Public down: Admin OK

    Just happened AGAIN. Repair DB using cPanel command. All returned to normal.
    What was different this time. Both Admin and Public down 500 error.

    When is NDDBC.html supposed to be triggered?

    ZC1.5.4 upgraded from 1.5.3 from 1.3.9h from 1.3.8a
    Upgraded by using v1.5.4 changed file list and DBupgrade
    PHP 5.5.25
    mySQL 5.5.42


    The myDEBUG is greek to me, so a layman's interpretation/suggestions would be appreciated.

    The last server logfile entry before webserver found to be down was:
    Code:
    157.55.39.16 - - [24/Aug/2015:10:16:36 -0700] "GET /index.php?pID=517 HTTP/1.1" 200 7638 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
    This the following server logfile entry when we found the server down:
    Code:
    MyStaticIPaddress - - [24/Aug/2015:11:34:40 -0700] "GET /MyZenCartAdminFolder/login.php?zenAdminID=5bc2585d7afd249f46543422847c46fd HTTP/1.1" 401 381 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0"
    This is the myDEBUG file generated at the same instant of our attempt to login to admin:
    ( I think that I have renamed all admin/login credentials )
    Code:
    [24-Aug-2015 11:34:53 America/Los_Angeles] #1  trigger_error(126:Incorrect key file for table './MyDBname/sessions.MYI'; try to repair it :: delete from sessions where expiry < 1440441292 ==> (as called by) /home/MycPanelLogin/public_html/includes/functions/sessions.php on line 86 <==, 256) called at [/home/MycPanelLogin/public_html/includes/classes/db/mysql/query_factory.php:155]
    #2  queryFactory->show_error() called at [/home/MycPanelLogin/public_html/includes/classes/db/mysql/query_factory.php:132]
    #3  queryFactory->set_error(126, Incorrect key file for table './MyDBname/sessions.MYI'; try to repair it, 1) called at [/home/MycPanelLogin/public_html/includes/classes/db/mysql/query_factory.php:262]
    #4  queryFactory->Execute(delete from sessions where expiry < 1440441292) called at [/home/MycPanelLogin/public_html/includes/functions/sessions.php:86]
    #5  _sess_gc(900)
    #6  session_start() called at [/home/MycPanelLogin/public_html/includes/functions/sessions.php:109]
    #7  zen_session_start() called at [/home/MycPanelLogin/public_html/MyAdminFolder/includes/init_includes/init_sessions.php:39]
    #8  require(/home/MycPanelLogin/public_html/MyAdminFolder/includes/init_includes/init_sessions.php) called at [/home/MycPanelLogin/public_html/includes/autoload_func.php:48]
    #9  require(/home/MycPanelLogin/public_html/includes/autoload_func.php) called at [/home/MycPanelLogin/public_html/MyAdminFolder/includes/application_top.php:156]
    #10 require(/home/MycPanelLogin/public_html/MyAdminFolder/includes/application_top.php) called at [/home/MycPanelLogin/public_html/MyAdminFolder/login.php:16]
    
    [24-Aug-2015 11:34:53 America/Los_Angeles] PHP Fatal error:  126:Incorrect key file for table './MyDBname/sessions.MYI'; try to repair it :: delete from sessions where expiry < 1440441292 ==> (as called by) /home/MycPanelLogin/public_html/includes/functions/sessions.php on line 86 <== in /home/MycPanelLogin/public_html/includes/classes/db/mysql/query_factory.php on line 155
    [24-Aug-2015 11:34:53 America/Los_Angeles] PHP Fatal error:  126:Incorrect key file for table './MyDBname/sessions.MYI'; try to repair it :: insert IGNORE into sessions
               values ('64977228d464bcbeae19f3a8cffbf858', '1440442193', '') ==> (as called by) /home/MycPanelLogin/public_html/includes/functions/sessions.php on line 65 <== in /home/MycPanelLogin/public_html/includes/classes/db/mysql/query_factory.php on line 155
    This is the 2nd myDEBUG file. I was surprised to see the DBname and DBpassword in that file. Both names have been edited. File attached instead of inserting CODE tags due to screen length of file.
    Attached Files Attached Files
    Rick
    RixStix (dot) com
    aka: ChainWeavers (dot) com

  10. #10
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: myDEBUG files Public down: Admin OK

    Simply put, the server crashed, and in doing so it corrupted one of the database tables (specifically the 'sessions' table).

    There is no way to tell what caused the server to crash (from the log files provided).

    It could be a hardware problem, it could be a software problem (runaway process consuming all available memory). Only your host will be able to provide a definitive answer to that.

    Although not really common, it isn't unusual (or surprising) that it is/was the sessions table that suffered the corruption because of all the database tables this is the one with the most active 'writes', in fact it is being written to pretty much all of the time which makes it prone to corruption when the server fails.

    Putting this another way, the database corruption is just a symptom of a more serious server related issue. I'd be taking this up with the host if I were you. Two server failures in as many weeks is not good.

    Cheers
    RodG

 

 
Page 1 of 4 123 ... LastLast

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: 10
    Last Post: 11 Feb 2016, 10:30 PM
  3. Replies: 4
    Last Post: 13 Dec 2014, 04:48 AM
  4. 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