Database moving or importing

I have Cs-cart installed on a server under a domain name. SITE A



I have installed Cs-cart in another domain which will sell the same products. SITE B



So, I exported the database from the initial site SITE A to my computer. ( an sql file)

I then imported this sql file to SITE B.



But there are errors and to index.php is not accessable.

The page reads as follows:





[COLOR=“DarkRed”]Database error: Table ‘rb0077_goodapple.cscart_block_positions’ doesn’t exist (1146)

Invalid query: SELECT location FROM cscart_block_positions WHERE object_id = 0
[/COLOR]

--------------------------------------------------------------------------------



[COLOR=“Green”]Backtrace: File: /home/rb0077/public_html/goodapple.eu/cscart/core/fn.database.php

Line: 310

Function: db_error

File: /home/rb0077/public_html/goodapple.eu/cscart/core/fn.database.php

Line: 102

Function: db_query

File: /home/rb0077/public_html/goodapple.eu/cscart/core/fn.cms.php

Line: 553

Function: db_get_row

File: /home/rb0077/public_html/goodapple.eu/cscart/core/fn.cms.php

Line: 510

Function: fn_sort_blocks

File: /home/rb0077/public_html/goodapple.eu/cscart/controllers/customer/init.php

Line: 51

Function: fn_get_blocks

File: /home/rb0077/public_html/goodapple.eu/cscart/core/fn.control.php

Line: 519

Function: include

File: /home/rb0077/public_html/goodapple.eu/cscart/core/fn.control.php

Line: 384

Function: fn_run_controller

File: /home/rb0077/public_html/goodapple.eu/cscart/index.php

Line: 27

Function: fn_dispatch [/COLOR]

Does anyone have any suggestions on how to resolve this issue or repair the database or to move, copy or import a mysql database fro Cs-cart.



Thanks Luziano

I think, it’s a settings problem in your backend. Maybe you should install and activate all addons in the second shop as in the first one. It says that something, what exist in the first shop, doesn’t exist in the second shop.

The table name is different.


Is this [COLOR=Red]rb0077_goodapple.[/COLOR] the prefix of the database?



But I would say if you need a copy on another server of your shop, then in cPanel compress the files in a zip format, backup the db, extract the archive on the new server, import the db and change the settings in the config files.

[quote name=‘Tool Outfitters’]The table name is different.[/quote]



If it is the table name (prefix) then the whole db must be wrong.

I doubt 2 databases are going to have the same prefix. Definately not on the same server.



The prefix can be removed and it would solve his problem.

[quote name=‘Tool Outfitters’]I doubt 2 databases are going to have the same prefix. Definately not on the same server.



The prefix can be removed and it would solve his problem.[/quote]



But I can’t understand how it’s possible to get only one table with a wrong prefix. If the wole db have this prefix, then it’s easier to change the prefix in the config file, if he is not familiar with MySQL.

Hmmm…didn’t think about that. You would think the error would occur with the first table. Only one way to find out.:wink:

[quote name=‘Tool Outfitters’]Hmmm…didn’t think about that. You would think the error would occur with the first table. Only one way to find out.;)[/quote]



That’s not possible that only one table in a database get a wrong prefix. Only, it was edited by the owner manualy in the db. I would go to the db through phpMyAdmin and check the db if all prefixes are called [COLOR=Red]rb0077_goodapple. [COLOR=Black]If so, then I would change the db code in the config files.[/COLOR][/COLOR]

My Guess is that the file system’s don’t match.



“Block Positions” as I recall are only relative from 2.0.9 onwards.

PS: It could be strong beer serving my memory incorrectly so be-forewarned.

[quote name=‘JesseLeeStringer’]My Guess is that the file system’s don’t match.



“Block Positions” as I recall are only relative from 2.0.9 onwards.

PS: It could be strong beer serving my memory incorrectly so be-forewarned.[/quote]



He said, he is new to CS-Cart, then I guess he use the 2.0.10.

[quote name=‘indy0077’]He said, he is new to CS-Cart, then I guess he use the 2.0.10.[/quote]



[url]http://goodapple.eu/cscart/index.php?version[/url] :slight_smile:

[quote name=‘JesseLeeStringer’][URL]http://goodapple.eu/cscart/index.php?version[/URL] :)[/quote]



Jesse, I love you…

… very good idea. The path… :smiley:



[url]รับทำเว็บไซต์ สอนทำเว็บไซต์ Joomla - WEB DESIGN-CREATIVE

[quote name=‘indy0077’]… very good idea. The path… :smiley:



[URL]รับทำเว็บไซต์ สอนทำเว็บไซต์ Joomla - WEB DESIGN-CREATIVE



Yup (10 character limit sucks)