Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Reinstalling the default database


kellbot

Recommended Posts

I suffered a hard disk crash... yuck. While I have backups of all my websites (and consequently my osCommerce installation), I did not backup my mysql database.

 

What's the best way to go about recreating the database? I know its created during the initial install of osCommerce, but I reeeeeeeeeeally don't want to reinstall it, because I *just* got everything working the way I wanted.

 

Thanks!

Link to comment
Share on other sites

Oy. Rock and a hard place.

 

Easiest thing to do is just run the installer again to load the db, kill all the files and upload your old ones.

 

You can find the stock db in the osC download

/catalog/install/oscommerce.sql

 

If you had contribs that modified the db you'll have to go throught that process again.

 

Any way you cut it the process won't be a ton of fun but can be done!

 

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Oy. Rock and a hard place.

 

Easiest thing to do is just run the installer again to load the db, kill all the files and upload your old ones.

 

You can find the stock db in the osC download

/catalog/install/oscommerce.sql

 

If you had contribs that modified the db you'll have to go throught that process again.

 

Any way you cut it the process won't be a ton of fun but can be done!

 

Iggy

It might be easier to just recreate the DB manually and run the oscommerce.sql. If you are using phpMyAdmin this shouldn't be a problem.

Link to comment
Share on other sites

Go to phpmyadmin, create a new blank database (same name as the last one if you can remember what it was). Then go to the SQL link, and use 'Location of text file' to locate the install/oscommerce.sql file on your computer, then click 'Go' button. All done.

 

Vger

Link to comment
Share on other sites

Go to phpmyadmin, create a new blank database (same name as the last one if you can remember what it was).  Then go to the SQL link, and use 'Location of text file' to locate the install/oscommerce.sql file on your computer, then click 'Go' button.  All done.

 

Vger

 

Great, thanks. Anyone know the line commands to do this, btw? I don't have phpMyAdmin installed.

Link to comment
Share on other sites

Far easier to just download phpMyAdmin and install it.  But before that just make sure that you don't have it installed already.

 

Vger

 

I can't install phpMyAdmin for a number of reasons, mostly because my server is pretty unstable right now (this is the 4th time we've reinstalled Apache this week) and I don't want to change anything more than I absolutely have to.

Link to comment
Share on other sites

Installing phpMyAdmin (a php script) shouldn't have any more of an effect than installing osC (another php script). But you can always use the installer, wipe the files, and upload your backup as well.

 

From the commandline

Dump/Restore mysql db

mysqldump -u[username] -p[password] [database] > [filename.sql]

mysql -u[username] -p[password] [database] < [filename.sql]

 

To get phpMyAdmin

http://www.phpmyadmin.net/home_page/

 

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...