ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

DB Error Number: 1146 - Moving ExpressionEngine to a different server

November 11, 2011 6:48am

Subscribe [2]
  • #1 / Nov 11, 2011 6:48am

    Jonathan Morgan

    51 posts

    This question may be related to a resolved thread.

    Hi there,

    We’re currently in the process of moving the site we’ve been developing from a Media Temple Grid Service account, to a more powerful server at VPS.NET.  All of the files and the DB have been moved successfully (I’ve checked the DB in phpmyadmin), but we’re currently getting this error:

    A Database Error Occurred
    Error Number: 1146
    
    Table 'db22074_76ltd.exp_sites' doesn't exist
    
    SELECT * FROM (`exp_sites`) WHERE `site_id` = 1
    
    Filename: core/EE_Config.php
    
    Line Number: 172

    I’ve updated the basepath values in config/config.php and config/database.php, including changing the DB hostname to localhost (rather than the MT internal address).

    Do you have any tips on how we might get past this roadblock?

    Many thanks!
    Jonathan.

  • #2 / Nov 11, 2011 5:24pm

    Kevin Smith

    4784 posts

    Hi Jonathan,

    Sorry to see you’re running into this on your migration. First, let’s just test to make sure your database details are working and that a PHP-based application can talk to MySQL successfully. Find the DB test utility at /system/expressionengine/utilities/dbtest.php and make a copy to your web root. This is an independent PHP file, so it runs self-contained rather than as a part of EE. Copy your database details to the appropriate lines inside the file, then run it from your web browser. This should let you know whether or not you’re set up to access MySQL through PHP.

    If everything looks good there, check to make sure the exp_sites table really is in your database. It should be, but it doesn’t hurt to double-check.

    If everything still looks good, give your database.php file a quick check again. I suspect some of the details there might not be right.

  • #3 / Nov 12, 2011 12:58am

    Jonathan Morgan

    51 posts

    Hi Kevin,

    thanks for your response!
    I used that script to check the DB and it was fine (see http://workisprogress.co.uk/dbtest.php), but then when I checked the DB everything higher in the alphabet than exp_r was missing (last entry was exp_reset_password) so we’re going to re-upload the DB, and hopefully things’ll be up and running.

    It’d be rad if you could keep this thread open for now though, until it’s up and running!

    Cheers,
    Jonathan

  • #4 / Nov 15, 2011 6:33am

    Jonathan Morgan

    51 posts

    Thanks for your help - my colleague re-uploaded the DB, and it’s now working properly without error messages.

  • #5 / Nov 15, 2011 3:16pm

    Lisa Wess

    20502 posts

    Glad to hear it Jonathan!  If anything else comes up, please don’t hesitate to let us know in a new thread.  Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases