Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Error 1044 when moving database to new server

    Quote Originally Posted by Annie_zaz View Post
    I ended up making the site work. I still don't know what was wrong, maybe a table or configure.php file thing.
    But what I did to correct it was upload a zc_install and reinstall it using the files from the old site and voila it worked.
    Aaah nuts. Spoke too soon.
    Ok, so I did a fresh install using same version, uploaded my files and selected the template I'm using through the admin dashboard.
    However it seems that all changes that I've made via the dashboard are not reflected. So I am presuming that the database didn't import.
    I did an import with the CREATE DATABASE IF NOT EXISTS statement and I get an 1044 error.
    If I do an import without the CREATE DATABASE IF NOT EXISTS statement it says it's imported successfully but no changes reflect.
    I have a feeling this is because of the two different prefixes from each host.
    So how do I overcome this?

  2. #12
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Error 1044 when moving database to new server

    Quote Originally Posted by Annie_zaz View Post
    Aaah nuts. Spoke too soon.
    Ok, so I did a fresh install using same version, uploaded my files and selected the template I'm using through the admin dashboard.
    However it seems that all changes that I've made via the dashboard are not reflected. So I am presuming that the database didn't import.
    I did an import with the CREATE DATABASE IF NOT EXISTS statement and I get an 1044 error.
    If I do an import without the CREATE DATABASE IF NOT EXISTS statement it says it's imported successfully but no changes reflect.
    I have a feeling this is because of the two different prefixes from each host.
    So how do I overcome this?
    Look at your old files:
    Includes/configure.php
    What is DB_PREFIX?

    New files:
    Same thing, waht is DB_PREFIX?
    Are they the same.

    By all this I mean there is a line:
    Code:
    define('DB_PREFIX', '');
    Where on the right side there may or may not be something between the single quotes.

    If they are the same... The next question is did the sql file being uploaded include a statement for each table such as

    Drop if exists or something similar? Or for that matter any such drop statement in the file?

    If not (or really if so), drop all of the ZC tables in this new database so that when importing the new file that there is no data to conflict.

    Backup, backup, backup...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #13
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Error 1044 when moving database to new server

    Quote Originally Posted by mc12345678 View Post
    There is a difference between a prefix for the database name and the prefix that is prepended to "every" table within the database... Following kobra's suggestion, if you look at the first table in the database or at the sql that was uploaded, do you have a table named admin or one that has something before the word admin? Also how many tables are there? Somewhere around 100? Or 200? Or more?
    Hello,
    On the left hand side I see half way down kinectwe infront of the tables. I have 194 tables.
    Name:  sql.jpg
Views: 38
Size:  30.5 KB

  4. #14
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Error 1044 when moving database to new server

    Quote Originally Posted by mc12345678 View Post
    Look at your old files:
    Includes/configure.php
    What is DB_PREFIX?

    New files:
    Same thing, waht is DB_PREFIX?
    Are they the same.

    By all this I mean there is a line:
    Code:
    define('DB_PREFIX', '');
    Where on the right side there may or may not be something between the single quotes.

    If they are the same... The next question is did the sql file being uploaded include a statement for each table such as

    Drop if exists or something similar? Or for that matter any such drop statement in the file?

    If not (or really if so), drop all of the ZC tables in this new database so that when importing the new file that there is no data to conflict.

    Backup, backup, backup...
    On the old includes/configure.php in DB_PREFIX it is ' ' empty.
    In the new config DB_PREFIX it says 'kinectwe'
    I do seem to have some DROP TABLE IF EXISTS `address_book`; for various things 'admin' etc ....

  5. #15
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Error 1044 when moving database to new server

    Quote Originally Posted by Annie_zaz View Post
    Hello,
    On the left hand side I see half way down kinectwe infront of the tables. I have 194 tables.
    Name:  sql.jpg
Views: 38
Size:  30.5 KB
    That may be because of one of the above actions as well... Btw, in the future if going to use a prefix, it is suggested that it end with an underscore for example... It helps with reading it as well as for any type of table name manipulations.

    But both appear to be present in that database, in particular by the total number of tables... It is as if two installs are present... One with a prefix of 'kinectwe' the other with a prefix of ''

    Should be able to look at the sql of the file being iimported to see if it has the prefix of kinectwe on all (most) of the tables as well... If both sets of the tables are present in the sql file, then need to figure out which is more recent as it is likely the one that was active on the store being moved... There are dates that are logged for various things which should make that discovery relatively easy...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #16
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Error 1044 when moving database to new server

    Quote Originally Posted by Annie_zaz View Post
    On the old includes/configure.php in DB_PREFIX it is ' ' empty.
    In the new config DB_PREFIX it says 'kinectwe'
    I do seem to have some DROP TABLE IF EXISTS `address_book`; for various things 'admin' etc ....
    So, based on that, if you make your new configure.php files (store and admin) have an empty DB_PREFIX then the new store should show the old store "stuff"..

    The kinectwe prefix if following the above discussion correctly was added, and then a "install" was done which would have generated ~98 tables all having that prefix and have "new" data that does not reflect the old data...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #17
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Error 1044 when moving database to new server

    Quote Originally Posted by mc12345678 View Post
    So, based on that, if you make your new configure.php files (store and admin) have an empty DB_PREFIX then the new store should show the old store "stuff"..

    The kinectwe prefix if following the above discussion correctly was added, and then a "install" was done which would have generated ~98 tables all having that prefix and have "new" data that does not reflect the old data...
    You are a bloody CHAMPION!!! I LOVE YOU. I edited the configure files and removed the kinectwe and it worked!
    Thanks soooo much
    So should I now remove all the tables that begin with kinectwe?

  8. #18
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Error 1044 when moving database to new server

    Quote Originally Posted by Annie_zaz View Post
    You are a bloody CHAMPION!!! I LOVE YOU. I edited the configure files and removed the kinectwe and it worked!
    Thanks soooo much
    So should I now remove all the tables that begin with kinectwe?
    To save your sanity in the future, yes. To reduce database bloat, yes. Affect on operation? None other than the bloat possibly "slightly" increasing database access time but no affect on the store.

    When looking at the database view in phpmyadmin, should have a listing of all of the tables on the right side, with checkboxes... Can check each of those tables, then select the delete option at the bottom of the list... There are "automated" ways, that can be done as well... If you go with a sql statement method, be sure to try a select version of the sql to see what tables will be dropped before doing the drop...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  9. #19
    Join Date
    Mar 2013
    Location
    Sydney, Australia
    Posts
    140
    Plugin Contributions
    0

    Default Re: Error 1044 when moving database to new server

    Quote Originally Posted by mc12345678 View Post
    To save your sanity in the future, yes. To reduce database bloat, yes. Affect on operation? None other than the bloat possibly "slightly" increasing database access time but no affect on the store.

    When looking at the database view in phpmyadmin, should have a listing of all of the tables on the right side, with checkboxes... Can check each of those tables, then select the delete option at the bottom of the list... There are "automated" ways, that can be done as well... If you go with a sql statement method, be sure to try a select version of the sql to see what tables will be dropped before doing the drop...
    Ok I will delete them. Thanks again for your help you are an mysql angel.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v139h Error 1044 when importing DATABASE
    By Mthirty5 in forum Installing on a Windows Server
    Replies: 11
    Last Post: 9 Jan 2016, 04:27 PM
  2. Moving to new site different server & database name
    By rufusclc in forum General Questions
    Replies: 4
    Last Post: 24 Mar 2009, 08:05 PM
  3. cart not working when moving to a new server
    By webdev316 in forum General Questions
    Replies: 4
    Last Post: 30 Oct 2008, 03:35 AM
  4. Problems when moving to a new server
    By Moncia in forum General Questions
    Replies: 3
    Last Post: 15 Sep 2007, 04:20 AM
  5. error when moving to a new server
    By fright-rags in forum General Questions
    Replies: 17
    Last Post: 25 Jun 2007, 05:16 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