Unix Technical Forum

delete all database and restore

This is a discussion on delete all database and restore within the MySQL forums, part of the Database Server Software category; --> I got an old mysql server with outdated databases I want to delete all the databases and import a ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 11:29 AM
nobody
 
Posts: n/a
Default delete all database and restore

I got an old mysql server with outdated databases

I want to delete all the databases and import a new set from a dump file.


I have like ten databases currently on there. What do i do to import my
current data on this server?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 11:29 AM
nobody
 
Posts: n/a
Default Re: delete all database and restore

I basically want to replace all the databases from one dump file I have. How
do I restore the databases from one dump file?
"nobody" <nobody@nobody.com> wrote in message
news:fgtkig$i7a$2@news.Stanford.EDU...
>I got an old mysql server with outdated databases
>
> I want to delete all the databases and import a new set from a dump file.
>
>
> I have like ten databases currently on there. What do i do to import my
> current data on this server?
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 11:29 AM
Good Man
 
Posts: n/a
Default Re: delete all database and restore

"nobody" <nobody@nobody.com> wrote in
news:fgtkup$ilr$2@news.Stanford.EDU:

> I basically want to replace all the databases from one dump file I
> have. How do I restore the databases from one dump file?


mysql -u <username> -p < 'path/to/dump/file.sql'

i suppose that answer could've been found at the google though.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-28-2008, 11:29 AM
nobody
 
Posts: n/a
Default Re: delete all database and restore

I have like 10 databases all backup to a single sql file. how do i restore
this to all database?

when i do mysql -u -p < backup.sql

I get

ERROR 1049 at line 24: Unknown database '`admin`'

what does this mean? I have a database in there called admin

how do I import all of them
"Good Man" <heyho@letsgo.com> wrote in message
news:Xns99E1F345EAA3Esonicyouth@216.196.97.131...
> "nobody" <nobody@nobody.com> wrote in
> news:fgtkup$ilr$2@news.Stanford.EDU:
>
>> I basically want to replace all the databases from one dump file I
>> have. How do I restore the databases from one dump file?

>
> mysql -u <username> -p < 'path/to/dump/file.sql'
>
> i suppose that answer could've been found at the google though.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2008, 11:29 AM
Good Man
 
Posts: n/a
Default Re: delete all database and restore

"nobody" <nobody@nobody.com> wrote in
news:fh07qu$n4$2@news.Stanford.EDU:

> I have like 10 databases all backup to a single sql file. how do i
> restore this to all database?
>
> when i do mysql -u -p < backup.sql
>
> I get
>
> ERROR 1049 at line 24: Unknown database '`admin`'
>
> what does this mean? I have a database in there called admin
>
> how do I import all of them
> "Good Man" <heyho@letsgo.com> wrote in message
> news:Xns99E1F345EAA3Esonicyouth@216.196.97.131...
>> "nobody" <nobody@nobody.com> wrote in
>> news:fgtkup$ilr$2@news.Stanford.EDU:
>>
>>> I basically want to replace all the databases from one dump file I
>>> have. How do I restore the databases from one dump file?

>>
>> mysql -u <username> -p < 'path/to/dump/file.sql'
>>
>> i suppose that answer could've been found at the google though.

>
>
>


Didja look at line 24?

Are you sure you have a database called "admin" and not "Admin"?

Please don't top post thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-28-2008, 11:29 AM
nobody
 
Posts: n/a
Default Re: delete all database and restore

>
> Didja look at line 24?
>
> Are you sure you have a database called "admin" and not "Admin"?
>
> Please don't top post thanks.


Yes there is a database called admin.

I am doing a restore from a mysql 5.x to a mysql 3.x server.

is that a problem?


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-28-2008, 11:29 AM
Good Man
 
Posts: n/a
Default Re: delete all database and restore

"nobody" <nobody@nobody.com> wrote in news:fh26pb$db5$2@news.Stanford.EDU:

>>
>> Didja look at line 24?
>>
>> Are you sure you have a database called "admin" and not "Admin"?
>>
>> Please don't top post thanks.

>
> Yes there is a database called admin.
>
> I am doing a restore from a mysql 5.x to a mysql 3.x server.
>
> is that a problem?


why are you going backwards? 3.x is practically ancient.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:48 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com