Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Database restore error


Guest

Recommended Posts

Posted

Long story short, I was trying to install a contribution that required working in the database, for one reason or another it wasn't cooperating, so I chose to revert to a back up of the database not even 20 minutes old from before I started fooling with it. Using the backup manager in the admin panel, it failed for reasons unkown, but not before deleting the database.

 

:o

 

So now I'm sitting here with a few backup .sql files, and no idea how to load them. I have phpmyadmin 2.6.4, php 4, and mysql5, I can't find anything to do this in phpmyadmin, and the mysql command line client is simply confusing me beyond belief.

 

All I see now in what was formerly the admin panel and my store is the following:

1146 - Table 'triplem.configuration' doesn't exist

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

[TEP STOP]

 

Help is very much appreciated.

Posted

Did you install phpMyAdmin or is it provided by the hosting company?

If you have control of the phpMyAdmin config file you can set it to read the folder your backups are stored in.

 

You can download the file to your computer and have a look at it to see if it looks OK.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Posted

The server is a local machine, I can walk downstairs and do whatever I need to.

 

Problem is I have no clue what to do. Is there a database import function or something like that in phpmyadmin? I'm not seeing anything to load the backup .sql file.

Posted

Just want to be sure before I try this, I've been reading the mysql documentation, in the sql query area in phpmyadmin, can i just select one of the sql files, hit go, and will that recompile my database? Or am I misunderstanding this?

Posted
Just want to be sure before I try this, I've been reading the mysql documentation, in the sql query area in phpmyadmin, can i just select one of the sql files, hit go, and will that recompile my database?

 

 

Yes! :P

 

Matti

Posted
Yes! :P

 

Matti

Awesome! Going to try it now. This is only the third time I've even opened phpmyadmin, so it's a little bit overwhelmig, hahaha.

 

I'm a welder and mechanic, my computer know-how is kind of lacking :P

Posted

Hmm... I think I have a problem, got this error:

 

SQL query: 

INSERT INTO categories( categories_id, categories_image, parent_id, sort_order, date_added, last_modified ) 
VALUES (

'21', 'clutchCAT.jpg', '30', '1', '2005-11-16 01:42:00', '730-35-46 79:06:53'
) 
MySQL said:

What's that square thing in front of 730? And is that the problem? there are a few of them in .sql file when I look at it in notepad.

Posted

OK, something got al screwed up somewhere in my OSC install I guess, the above error was the result of the date 35/46/730 at 79:06:53. How that got in there, nooooo idea, the entries with that as a created date were the dirst ones I made as I recall. So I just copied their last modified dates over the weird ones, and it moved past those.

 

Now I'm down to product descriptions and such, it's having a lot of issues with special characters, so i'm manually changing them in the sql file. Major pain in my ass, but I'm very glad to have this figured out.

 

Thanks for the help, guys :)

Posted
The server is a local machine, I can walk downstairs and do whatever I need to.

 

Problem is I have no clue what to do. Is there a database import function or something like that in phpmyadmin? I'm not seeing anything to load the backup .sql file.

 

in: config.inc.php

 

define:

 

$cfg['UploadDir'] = 'your_path';

 

Make it the same as the FS (file system) path to your backup directory and you can browse that directory for the file to import.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...