coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: benseth on April 29, 2006, 08:40:53 AM

Title: MSQL
Post by: benseth on April 29, 2006, 08:40:53 AM
My host accdiently deleted my MSQL, but I've magnaged to save a .sql file of it.

I was wondering, how can i get it back up?  I copy and paste the content (it was over 11mb) but it says table dropped diasbled?

does anyone know what to dio?
Title: Re: MSQL
Post by: Stramm on April 29, 2006, 08:55:13 AM
you need to restore the db... either with a tool like phpmyadmin (http://www.phpmyadmin.net) or from shell.

mysql -u dbusername -p dbname < backup.sql
dbusername = your mysql username
dbname= the name of the database
backup.sql = the name of your mysql backup file

ahmmm... I assume that you mean MySQL and not MSQL
Title: Re: MSQL
Post by: benseth on April 29, 2006, 12:10:48 PM
Yes, sorry lol typo

When I upload the file it sometimes says tables dropped or something, so I erased that line.

Now, when I upload the .sql (the size is 11mb) it takes a while.

But when the page refreshes, it's either cannot find or a blank page?

My site is hosted on servage? if that changes anything.
Title: Re: MSQL
Post by: Stramm on April 29, 2006, 01:00:21 PM
large databases often cannot be restored using phpmyadmin cause restoring times out. Means a web based tool won't be able to help you (there's one tool, but I think it can't restore phpmyadmin dumps)

And you're not supposed to changed the backup file. If you remove the 'drop' line, then you need to manually epty the database before a restore. With that line MySQL 'drops' the table before creating it new with the data stored in the backup file.

Use the shell command (as I've written above) or ask your host to restore your db
Title: Re: MSQL
Post by: benseth on April 30, 2006, 12:58:36 AM
I dont know much about shell.

I read above, but where do i start and all?  Sorry i'm a beginner at this :)
Title: Re: MSQL
Post by: Joachim Müller on April 30, 2006, 09:48:29 AM
Quote from: Stramm on April 29, 2006, 01:00:21 PM
ask your host to restore your db
go for option 2 then, as Stramm suggested.
Title: Re: MSQL
Post by: benseth on May 06, 2006, 12:00:52 AM
Is it possible for another alternative?

Instead of uploading the one big .sql I can copy and paste it separetly into thoes different categories on the side of myphpadmin, will that work?
Title: Re: MSQL
Post by: Joachim Müller on May 06, 2006, 06:21:15 AM
yes, you could paste sections of the dump into phpMyAdmin's sql field as well