Post by patrickmullins » Sun Jan 04, 2015 3:33 am

Hi can anyone help me out, I was messing about in my hosting control panel and accidently deleted the database for my website in the hosting control panel.

I do have a backup of the database that I backed up within the opencart admin area, but I can not restore this as I have deleted the database so the website no longer shows up.

I have tried creating a new database with the same name and password and importing the backup I have using phpMyadmin but it doesn't upload it gives out this error

Error

SQL query:

TRUNCATE TABLE `oc_address` ;



MySQL said: Documentation
#1146 - Table 'cl50-foruk.oc_address' doesn't exist

can anyone help me get my site back online???

PLEASE lol
thanks Patrick


Posts

Joined
Fri Jan 20, 2012 4:32 am

Post by Selective555 » Sun Jan 04, 2015 3:46 am

The database you deleted by accident, was it a fresh new database? How new or how old was it?

Are you still building the online shop or have you had buyers on your shop, buy things from you already?

Also, when you tried recreating the database with the same names and same passwords, did you also try adding the install file again and going to the install file?

I created a MOD, take a look at it ---> Latest News/Messages Scroll Across Top Of Shop (MOD)


Active Member

Posts

Joined
Wed Nov 26, 2014 1:29 pm

Post by patrickmullins » Sun Jan 04, 2015 3:52 am

Selective555 wrote:The database you deleted by accident, was it a fresh new database? How new or how old was it?

Are you still building the online shop or have you had buyers on your shop and buy things from you already?

Also, when you tried recreating the database with the same names and same passwords, did you also try adding the install file again and going to the install file?
thanks for your reply, its a new site, that's not yet live, there has been no sales on it, but I have added pages and products to the site and spent weeks adding this info so don't want to have to start again.

I had a custom theme installed on it

http://themeforest.net/item/simplify-ex ... ic/8654860

that has lots of built in mods. I have tried putting the install folder back, and re installing onto the new database, this aloud me to login to the admin area but I could not successfully restore using the backup, I think this may be down to theme I had installed, as the restore just crashes in the open cart admin if I do it this way.


Posts

Joined
Fri Jan 20, 2012 4:32 am

Post by Selective555 » Sun Jan 04, 2015 4:11 am

I never had to reinstall a database before, but when you backed up your database, did you also backup the shop folder as well?

Perhaps adding them both back may solve the problem of the restore, but I don't suggest deleting anything else just in case it doesn't work.

If you have a back up of your shop folder, try renaming the current shop folder to something else, then try restoring the shop folder and the database. Then if that doesn't work, you'll still have the original shop folder you can rename back again.

I created a MOD, take a look at it ---> Latest News/Messages Scroll Across Top Of Shop (MOD)


Active Member

Posts

Joined
Wed Nov 26, 2014 1:29 pm

Post by patrickmullins » Sun Jan 04, 2015 4:29 am

Selective555 wrote:I never had to reinstall a database before, but when you backed up your database, did you also backup the shop folder as well?

Perhaps adding them both back may solve the problem of the restore, but I don't suggest deleting anything else just in case it doesn't work.

If you have a back up of your shop folder, try renaming the current shop folder to something else, then try restoring the shop folder and the database. Then if that doesn't work, you'll still have the original shop folder you can rename back again.
Thanks but this wont change anything, as the problem is the database, as the shop files have not been affected, its just the database was deleted, do all the info for the site has gone, I need to know if there is a way to restore the database from the database backup I have from the opencart admin.

I am going to try some stuff tomorrow see if I can get the products and pages back... this is a nightmare hahah but suppose it will teach me to do full database backups from now on.


Posts

Joined
Fri Jan 20, 2012 4:32 am

Post by Selective555 » Sun Jan 04, 2015 4:46 am

patrickmullins wrote:Thanks but this wont change anything, as the problem is the database, as the shop files have not been affected, its just the database was deleted, do all the info for the site has gone, I need to know if there is a way to restore the database from the database backup I have from the opencart admin.
I'm pretty sure you have to do restores from your cPanel.

A heads up about opencart though, I had to delete my shop and database and reinstall a fresh new shop and a fresh new database about 8 times before figuring out what not to touch in the Admin panel. The way opencart is designed, they let you delete many things in the Admin panel that no one should ever be allowed to. Sadly it's a trial and error experience.

I created a MOD, take a look at it ---> Latest News/Messages Scroll Across Top Of Shop (MOD)


Active Member

Posts

Joined
Wed Nov 26, 2014 1:29 pm

Post by dabomb59404 » Sun Jan 04, 2015 1:50 pm

patrickmullins wrote:SQL query:

TRUNCATE TABLE `oc_address` ;

MySQL said: Documentation
#1146 - Table 'cl50-foruk.oc_address' doesn't exist
The database backup in OC is written only to restore to the database it came from and does not populate an empty database. You could try importing the opencart.sql file that comes with the installation of your version of OC into your database and then import your backup of your database you made thru OC into your database.

Selective555 wrote:The way opencart is designed, they let you delete many things in the Admin panel that no one should ever be allowed to.
He did this thru his host cPanel not the admin in OC and there is absolutely nothing in the OC admin that you should not be allowed to delete. Name one of those many things you are referring to that you shouldn't be allowed to delete? Everything there that you can delete you certainly should be allowed to do and there is nothing wrong with that design.

User avatar
Active Member

Posts

Joined
Thu Jun 09, 2011 5:21 am

Post by ManchesterGuy786 » Sun Jan 04, 2015 6:47 pm

hi, did you contact your host to restore the database? as they normally make backups of any changes and can restore immediately.


Posts

Joined
Wed Dec 31, 2014 2:07 am

Post by Selective555 » Sun Jan 04, 2015 7:02 pm

dabomb59404 wrote:
Selective555 wrote:The way opencart is designed, they let you delete many things in the Admin panel that no one should ever be allowed to.
He did this thru his host cPanel not the admin in OC and there is absolutely nothing in the OC admin that you should not be allowed to delete. Name one of those many things you are referring to that you shouldn't be allowed to delete? Everything there that you can delete you certainly should be allowed to do and there is nothing wrong with that design.
Here's the two obvious ones... but the Admin panel is filled with things no one should ever be able to delete.

Catalog > Categories
DO NOT DO ANYTHING WITH >>>!!! DESIGN !!!<<< IT WILL SCRAP YOUR ENTIRE SHOP

System > Design > Layout
DO NOT DO ANYTHING WITH >>>!!! STORE OR ROUTE !!!<<< IT WILL SCRAP YOUR ENTIRE SHOP

I created a MOD, take a look at it ---> Latest News/Messages Scroll Across Top Of Shop (MOD)


Active Member

Posts

Joined
Wed Nov 26, 2014 1:29 pm

Post by dabomb59404 » Sun Jan 04, 2015 9:02 pm

Selective555 wrote: Here's the two obvious ones... but the Admin panel is filled with things no one should ever be able to delete.

Catalog > Categories
DO NOT DO ANYTHING WITH >>>!!! DESIGN !!!<<< IT WILL SCRAP YOUR ENTIRE SHOP

System > Design > Layout
DO NOT DO ANYTHING WITH >>>!!! STORE OR ROUTE !!!<<< IT WILL SCRAP YOUR ENTIRE SHOP
:laugh: OMG obviously you are totally clueless about OC and what those settings are for and unless you know what they are for and what they do and how to use them then why would you even mess with them? Maybe you need to read the OC documentation first? I use those settings often as do most anyone that uses OC that knows what they are for and how to use them and especially the layouts are absolutely necessary. Like I said there is nothing in the OC admin that you should not be allowed to delete and if you don't know what the settings are for and what you are doing then simply don't mess with them until you do. Common sense?

User avatar
Active Member

Posts

Joined
Thu Jun 09, 2011 5:21 am

Post by patrickmullins » Mon Jan 05, 2015 2:35 am

dabomb59404 wrote:
The database backup in OC is written only to restore to the database it came from and does not populate an empty database. You could try importing the opencart.sql file that comes with the installation of your version of OC into your database and then import your backup of your database you made thru OC into your database.
Thanks this sort of worked, I created a new database with the same name and password, I then imported the opencart.sql, but then when I went to import the database I had backed up from the oc admin it didn't work, so I started braking it down into sections, importing each section at a time, missing the ones out giving out errors, this then got my site working again. but wasn't fully back to normal.

when I had added all the sections that wasn't giving errors I then tried the full database again and it worked this time.

my site is now back up to how it was.

thanks everyone for all the help.

got to over opencart.


Posts

Joined
Fri Jan 20, 2012 4:32 am

Post by Selective555 » Mon Jan 05, 2015 7:24 am

dabomb59404 wrote:there is absolutely nothing in the OC admin that you should not be allowed to delete. Name one of those many things you are referring to that you shouldn't be allowed to delete?
Selective555 wrote: Here's the two obvious ones... but the Admin panel is filled with things no one should ever be able to delete.

Catalog > Categories
DO NOT DO ANYTHING WITH >>>!!! DESIGN !!!<<< IT WILL SCRAP YOUR ENTIRE SHOP

System > Design > Layout
DO NOT DO ANYTHING WITH >>>!!! STORE OR ROUTE !!!<<< IT WILL SCRAP YOUR ENTIRE SHOP
Why would you even mess with them? Simply don't mess with them. Common sense?
I proved my point!

And what about deleting "Options"? like "checkbox"? There's no way to get that stuff back once those are deleted. It might as well ask if you want to delete your Admin panel.

I created a MOD, take a look at it ---> Latest News/Messages Scroll Across Top Of Shop (MOD)


Active Member

Posts

Joined
Wed Nov 26, 2014 1:29 pm

Post by dabomb59404 » Mon Jan 05, 2015 1:16 pm

Selective555 wrote:
dabomb59404 wrote:there is absolutely nothing in the OC admin that you should not be allowed to delete. Name one of those many things you are referring to that you shouldn't be allowed to delete?
Selective555 wrote: Here's the two obvious ones... but the Admin panel is filled with things no one should ever be able to delete.

Catalog > Categories
DO NOT DO ANYTHING WITH >>>!!! DESIGN !!!<<< IT WILL SCRAP YOUR ENTIRE SHOP

System > Design > Layout
DO NOT DO ANYTHING WITH >>>!!! STORE OR ROUTE !!!<<< IT WILL SCRAP YOUR ENTIRE SHOP
Why would you even mess with them? Simply don't mess with them. Common sense?
I proved my point!

And what about deleting "Options"? like "checkbox"? There's no way to get that stuff back once those are deleted. It might as well ask if you want to delete your Admin panel.
You are wrong again as you can always add back any deleted option. That is what the add options are for. That goes for anything else you delete there is also the option to add. Without an option to delete anything means you are stuck with it so you have to be able to delete as well as add things. All you have proved is your complete lack of knowledge in using OpenCart and your complete lack of common sense too.

User avatar
Active Member

Posts

Joined
Thu Jun 09, 2011 5:21 am
Who is online

Users browsing this forum: No registered users and 9 guests