Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Jun 2016
    Location
    Stuart VA
    Posts
    281
    Plugin Contributions
    0

    Default Can't connect to database

    My hosting company is telling me that the reason my site still isn't working is that a wordpress database was deleted (at their request) and it's somehow involved in connecting to the zencart database. I have explained to them that zencart does not use wordpress databases, period, but they insist that they can't restore the site to normal operation without the missing wordpress database. So I'm dead in the water. Can anyone help?

  2. #2
    Join Date
    Jun 2016
    Location
    Stuart VA
    Posts
    281
    Plugin Contributions
    0

    Default Re: Can't connect to database

    Update to the above--my hosting company is saying they just can't figure out what's wrong. They want me to do a vanilla re-install of zencart in a different directory and then try to connect that to the existing database. I'm afraid that I may wipe out the database with all my data in it if I do that. I have a backup and will do another one, but I'm not convinced this is going to make any difference. Does anyone have any idea why the software wouldn't be able to connect to the database that's been in use all along?

  3. #3
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,391
    Plugin Contributions
    0

    Default Re: Can't connect to database

    sounds like you need someone who knows what they are doing to log in and lay eyeballs on it...
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  4. #4
    Join Date
    Jul 2012
    Posts
    11,635
    Plugin Contributions
    13

    Default Re: Can't connect to database

    Why's? Because they've manipulated any number of characteristics/parts of accessing the database, username, permissions, database name, server on which it is hosted, permissions of connecting from another location (did just move the site from where it was to the VPS), they've changed the DB_PREFIX within the database, etc... any of these and possibly others could be the cause. Making/keeping a backup of the database (which for other reading is a different backup than that of the files that serve the store) is a grand idea.

    It may take creating a new database with credentials for a new user, to then have the contents of your existing database imported into that new database. Then of course to update the includes/configure.php and admin/includes/configure.php files as necessary to support using the old content in the new database.

    As far as concerns from your side of installing as you go through the zc_install process, don't install to the working good database
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  5. #5
    Join Date
    Jul 2012
    Posts
    11,635
    Plugin Contributions
    13

    Default Re: Can't connect to database

    Also should mention. When ZC identifies the inability to connect to the database, it typically starts off with some "cookie-cutter" message, but it's the last few bullets in the message that really get to the meat of the issue and should identify what the cause is for not being able to connect. If that can't be decyphered, then please post the entirety of the message protecting whatever nugget is now considered "personal" though it may have previously been published elsewhere.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  6. #6
    Join Date
    Jun 2016
    Location
    Stuart VA
    Posts
    281
    Plugin Contributions
    0

    Default Re: Can't connect to database

    Quote Originally Posted by mc12345678 View Post
    Why's? Because they've manipulated any number of characteristics/parts of accessing the database, username, permissions, database name, server on which it is hosted, permissions of connecting from another location (did just move the site from where it was to the VPS), they've changed the DB_PREFIX within the database, etc... any of these and possibly others could be the cause. Making/keeping a backup of the database (which for other reading is a different backup than that of the files that serve the store) is a grand idea.

    It may take creating a new database with credentials for a new user, to then have the contents of your existing database imported into that new database. Then of course to update the includes/configure.php and admin/includes/configure.php files as necessary to support using the old content in the new database.

    As far as concerns from your side of installing as you go through the zc_install process, don't install to the working good database
    The site was moved to the current VPS almost a year ago and has been working fine there since then. But yes to all the rest of what you said. I do a database backup every few days and have done one today. It does concern me that the backup is only 1 meg. I know the.gz has good compression but that still seems awfully small.

    I can get to the database via PhpAdmin and have not had to do anything different with credentials, so I don't think the database itself has been changed. And I know how to change the configure.php files to reflect connecting to a new database. So I'll try creating a new database before doing a complete new reinstall. I don't have a copy of my version of Zencart anyway--I'm still using 1.55a. In fact, I have a test installation of Zencart that I can play with (it also can't connect to its database, which was separate from the live one).

  7. #7
    Join Date
    Jun 2016
    Location
    Stuart VA
    Posts
    281
    Plugin Contributions
    0

    Default Re: Can't connect to database

    Quote Originally Posted by barco57 View Post
    sounds like you need someone who knows what they are doing to log in and lay eyeballs on it...
    I have no problem with that, but I don't think anyone can tell anything more than I can from just looking at what's available via ftp or via cpanel. The techs are telling me that there was some kind of connection through an old Wordpress database that was deleted. The only thing I can think of is that they somehow did that when I was moved to the VPS about a year ago. There was an old and unused Wordpress database on the site at that time, but there would have been no reason to make any connection with it, and I certainly did not. It took them four days to get my site up after moving to the VPS, and I wonder now what sort of workarounds they tried in order to get everything to work.

  8. #8
    Join Date
    Jun 2016
    Location
    Stuart VA
    Posts
    281
    Plugin Contributions
    0

    Default Re: Can't connect to database

    Huh. I looked at the server error log again, and it claims I was denied because it couldn't find a specific image in the template/images directory. There has never been such an image in that directory, but what the heck. I gave a random image that name, copied it up, and now the front end appears to be working again. But I still can't get to the admin side and it is not producing a server error. I guess I'm back on the phone with them again, but if any of you have an idea why the customer side would be connecting to the database and the admin side would not, I'm all ears.

  9. #9
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,391
    Plugin Contributions
    0

    Default Re: Can't connect to database

    ok, cpanel... go in and remove the current user on the database, create a new user and attach it to the database and change the config files to use that new connection information for the new user.
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  10. #10
    Join Date
    Jun 2016
    Location
    Stuart VA
    Posts
    281
    Plugin Contributions
    0

    Default Re: Can't connect to database

    I take it back. Placing an image in that file gave me access to the menu page but I'm still getting a 'couldn't connect to the database' error if I go any farther than that. Back to square one.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Can't connect to my database.
    By misty16 in forum General Questions
    Replies: 32
    Last Post: 13 Oct 2010, 05:10 PM
  2. Help! Site can't connect to my database
    By mw4kids in forum Upgrading from 1.3.x to 1.3.9
    Replies: 7
    Last Post: 15 Jun 2009, 10:04 PM
  3. Can't connect to database during installation
    By isaacr25 in forum Installing on a Linux/Unix Server
    Replies: 14
    Last Post: 29 Sep 2007, 06:34 AM

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