Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default database issues after server migration

    Hi. I have to get to bed... brain's not working anymore.

    My host migrated my site from one server to another. it was supposed to be "seamless". All I get is the "can't connect to database" error. Was hoping you guys could give me some things to check in the morning. I went into cpanel and checked that the database was there. its the exact same size as it was on the old server. "check db" says its OK. Users are the same as before, passwords are the same as before. Anything I'm missing?

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

    Default Re: database issues after server migration

    Which of these steps did they fail to include?
    http://www.zen-cart.com/content.php?...fferent-server

    Zen Cart's database connection is simple:
    1. reads the DB_XXXXXX values from configure.php
    2. PHP tells MySQL to connect using those credentials
    If you get an error, then the credentials are wrong (or haven't been created in MySQL, which still of course makes your credentials wrong).

    Caveat: If you use a different DB_PREFIX between servers (this matter is mentioned in the above FAQ article), then your database tables won't be found. But that won't cause a "can't connect to database" error; it would say something like "table doesn't exist", which is a different issue than what you describe.
    .

    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.

  3. #3
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: database issues after server migration

    This is an issue you should be discussing with your Hoster as they are in the best position to solve the problem.

  4. #4
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: database issues after server migration

    Rob... really? Did you read my question? They screwed up something and I'm hear trying to get some tips. Do you really think I'm not in discussion with them? Of course I am... but they're somehow dumbfounded.

    DrByte, thanks. Of course they haven't done any of the steps listed on that link. Nor should they, because its not migration from one host to another by myself but rather from one physical server to another on the same host. And this isn't the first time... this is pretty routine and I shouldn't have to do anything other than put it down for maintenance on the old server and reactivate on the new. But this time I just get db errors. I've checked the credentials and even deleted and recreated (and re-permissioned) the user just in case that got corrupted. I checked in configure.php and confirmed all that info is correct.

    I tried that cache fixing utility and all I get is the same "can't connect" page. But that gave me the clue to go into phymyadmin and clear the sessions... but I couldn't get into phpmyadmin. So there's something wrong there. Back the host.

    Now back to Rob, who will undoubtedly say "see, I told you - its with the host". And no kidding. Obviously its with the host... the discussion here was to give me tips on how to help them help me. Now I have something. hopefully it gets me somewhere.

  5. #5
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: database issues after server migration

    Not sure why my post would give you so much anxiety as you never mentioned any discussions with your host on the problem. Even though I may have stated the obvious, you'd be surprized how people do not communicate with their Hoster about these types of problems. This is especially true when, as in your case, it is the Hoster who caused the problem and they should be the ones to fix it.

  6. #6
    Join Date
    Jun 2005
    Location
    Kelowna, BC Canada
    Posts
    1,075
    Plugin Contributions
    6

    Default Re: database issues after server migration

    sure... so your mechanic screws up your motor and doesn't know how to fix it so you go to automotive forums to ask what the problem might be and you expect "talk to your mechanic"?

    Anxious because I'm losing money because someone was an idiot and its still not resolved.

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: database issues after server migration

    I understand you are anxious about the site problems and losing money but people trying to help can only go by the information you provide.

    For example, in this case the first thing you look at is DNS.

    Are Nameservers the same as they were before?
    Do you have a new IP?
    Have you confirmed what IP your Domain name is resolving to?
    What does a traceroute show?


    If the above is as it should be, then you start at the config files.

    You say you have confirmed that input for; database name, username and password are all correct in the config files and match your new database settings.


    Then you look at the error logs.

    Error logs through cPanel.
    Error log file in cPanel, which you need File Mgr. or FTP program to view.
    Error logs in Zen Cart.

    The above should provide a good starting point for anyone to find out what the problem is.

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

    Default Re: database issues after server migration

    Quote Originally Posted by s_mack View Post
    DrByte, thanks. Of course they haven't done any of the steps listed on that link. Nor should they, because its not migration from one host to another by myself but rather from one physical server to another on the same host. And this isn't the first time... this is pretty routine and I shouldn't have to do anything other than put it down for maintenance on the old server and reactivate on the new. But this time I just get db errors. I've checked the credentials and even deleted and recreated (and re-permissioned) the user just in case that got corrupted. I checked in configure.php and confirmed all that info is correct.

    I tried that cache fixing utility and all I get is the same "can't connect" page. But that gave me the clue to go into phymyadmin and clear the sessions... but I couldn't get into phpmyadmin. So there's something wrong there. Back the host.
    Fastest way to a solution:
    1. Install a new copy of ZC into a subdirectory and separate database (create the db but assign the same user to it, to rule out user/pwd issues)
    2. Now you have working configure.php files. Compare those to your broken site, and adjust accordingly. Obviously the different database and file paths would need adjustment.
    3. Then delete the temporary new ZC from that subdirectory, and delete that temporary database.

    I would also add that if you're using "localhost" as the DB_SERVER value, the matter is simplest. But if it's *not* using localhost, then perhaps it's a dns/cache thing and it's actually looking for the db on the wrong server.
    .

    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. Can't access processor gateway after server migration.
    By JacobsCHAOS in forum Installing on a Linux/Unix Server
    Replies: 13
    Last Post: 3 Feb 2016, 10:56 PM
  2. v151 Can't Login in After Server Migration at GoDaddy
    By LindeeG in forum Basic Configuration
    Replies: 5
    Last Post: 21 Jan 2016, 03:59 PM
  3. server migration - can't access admin on new server (APC problem)
    By nathanscrivener in forum General Questions
    Replies: 8
    Last Post: 16 Nov 2010, 07:09 AM
  4. Server migration issues
    By dambrisco in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 27 Aug 2009, 04:48 AM
  5. Blocking client's IP address after migration to our own server
    By Pocohantus in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 30 Nov 2007, 08:02 AM

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