Page 1 of 1
Migrating MySql Database
Posted: Mon Jul 16, 2012 8:00 pm
by dazthephot
Hi all, i have been contacted by my Host to say that they are shutting down the database where my opencart store lives and i should migrate the content onto a new msql database.
i can probably do it using php myadmin but which files in the opencart installation will have to adjusted with the new database name?
i tried recently on a coppermine picture database i manage but i was unsuccesful. This store i have is a commercial one i run for a client and would be devastated if i lost the store contents.
any help would be appreciated.
store is khinteriorsltd.co.uk/ocart
regards
daz
Re: Migrating MySql Database
Posted: Mon Jul 16, 2012 8:04 pm
by bigchili
The only files you would need to update with the new database name and password are the config.php and admin/config.php files.
As for the database itself, if you have cPanel, you can just go to backups and make a database backup there.
If you go into the OpenCart admin panel, System --> Backup / Restore, you can also backup the database contents from there.
Re: Migrating MySql Database
Posted: Mon Jul 16, 2012 8:14 pm
by dazthephot
thanks bigchilli
i do use the backup facility within opencart and i have downloaded the store via ftp very recently.
the contents of the store, i.e products, are they held within the database or does something in the database point to where the products are in a folder inside OC? i'm thinking about all the information linked to a product, price, description etc
i also have a category based shipping extension running, would that be affected?
Re: Migrating MySql Database
Posted: Mon Jul 16, 2012 8:22 pm
by bigchili
dazthephot wrote:the contents of the store, i.e products, are they held within the database or does something in the database point to where the products are in a folder inside OC? i'm thinking about all the information linked to a product, price, description etc
All the product info is in the database. Only thing I can think is product images, but as long as those pathways stay the same you shouldn't have a problem.
dazthephot wrote:i also have a category based shipping extension running, would that be affected?
Shouldn't be.
Re: Migrating MySql Database
Posted: Mon Jul 16, 2012 8:31 pm
by dazthephot
you're a star, thank you.
i'll be sure to post my progress incase anyone else encounters this.
regards
Re: Migrating MySql Database
Posted: Sat Jul 21, 2012 12:39 am
by dazthephot
Progress - success!
Had to get a bit of help as phpmyadmin kept timing out and only exporting half the tables. SQL administrator did a better job then the import went smoothly.
Once the config and admin/config files were altered with the new DB name and password all was well.
thanks again.
darren
Re: Migrating MySql Database
Posted: Tue Jul 24, 2012 10:45 pm
by elion
I usually did this by using cpanel->phpmyadmin, export the structures of the 'old' DB including the data, and import the structure and data to a new DB, and them edit the config.php and admin/comfig.php swithing 'old' DB to the 'new' DB. when importing, some hosts only let you to import little files, so in this stituation, i have to seperate the exported file (.sql)into several small sql files.
Re: Migrating MySql Database
Posted: Sun Jul 29, 2012 10:02 am
by ungury
Hello. I´m very new to this. I have two sites, one is in a older opencart version, and the new one with 1.5.3.1,I had decided to have different admins for design purposes. I already understood by your postings, how to back up a database, so now my question is How do you install the database to the new site? Please provide me with simple steps if you could, since I´m really a novice into this. Thanks a Lot! =)
Re: Migrating MySql Database
Posted: Mon Aug 06, 2012 9:36 am
by myroto
I have the same question as ungury. Please help!