boards.servelocity.net Forum Index boards.servelocity.net
The Servelocity Community
Get your own Servelocity Server now
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MySQL Databases

 
Post new topic   Reply to topic    boards.servelocity.net Forum Index -> Servelocity Guides & Howtos
View previous topic :: View next topic  
Author Message
RSE



Joined: 18 Nov 2004
Posts: 5
Location: Leeds, UK

PostPosted: Thu Dec 30, 2004 3:34 pm    Post subject: MySQL Databases Reply with quote

Hi,

Can anyone tell me where the MySQL databases are stored on these servers. I want to back mine up through SSH but can't find them.

N.B. I can't use PHPMyAdmin because for some reason all of my sites have stopped working (great).

Thanks for your help.
_________________
Adam Ross Williams
IT & Marketing Manager
SLBM.co.uk
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN MessengerGet your own Servelocity server here
:LJ:



Joined: 21 Dec 2004
Posts: 426

PostPosted: Thu Dec 30, 2004 4:02 pm    Post subject: Reply with quote

You don't need to backup the data files - just run a command like this :

Code:

mysqldump --databases {database name} >dbdump.sql


That will give you a runnable SQL script in the file dbdump.sql, which includes the whole structure and all the data.

To import it back into the server, run :

Code:

mysql -u root -p <dbdump.sql
Back to top
View user's profile Send private message Get your own Servelocity server here
RSE



Joined: 18 Nov 2004
Posts: 5
Location: Leeds, UK

PostPosted: Thu Dec 30, 2004 4:07 pm    Post subject: Reply with quote

Excellent, that has worked perfectly... i might even go all out and write a php script to do that then email me the file home, next time im feeling lucky!!

Thanks Lee you're a star!
_________________
Adam Ross Williams
IT & Marketing Manager
SLBM.co.uk
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN MessengerGet your own Servelocity server here
:LJ:



Joined: 21 Dec 2004
Posts: 426

PostPosted: Thu Dec 30, 2004 4:57 pm    Post subject: Reply with quote

No problem, mate - I'm useful sometimes.

Incidentally, if you do ever want to copy the datafiles themselves, you have to stop the server first. It's actually possible to hot-swap datafiles between 4.1 and 4.0, too, but only if you don't have any InnoDB tables and no transactions are currently in progress.

Oh, one other thing - SQL dump files compress very well. It's usually worth doing that before you transfer them anywhere.
Back to top
View user's profile Send private message Get your own Servelocity server here
:LJ:



Joined: 21 Dec 2004
Posts: 426

PostPosted: Sun Feb 06, 2005 2:23 am    Post subject: Reply with quote

Suggest move to guides (possibly - it might be an idea to replace with a decent n00b guide to setting up MySQL 4.1 rather than 3.23 which comes as an option).
Back to top
View user's profile Send private message Get your own Servelocity server here
Admin
Servelocity Staff


Joined: 01 Jan 1970
Posts: 124

PostPosted: Sun Feb 06, 2005 2:31 am    Post subject: Reply with quote

Let's put it there for now Smile
Back to top
View user's profile Send private message Send e-mail Get your own Servelocity server here
andyccn



Joined: 04 Jan 2005
Posts: 380
Location: Midlands, UK

PostPosted: Mon Feb 07, 2005 7:46 pm    Post subject: Reply with quote

RSE wrote:
Excellent, that has worked perfectly... i might even go all out and write a php script to do that then email me the file home, next time im feeling lucky!!

Thanks Lee you're a star!


I've already done this, use it as a cron job every night! (It saves the file in a place on my server which I can download via FTP.)

Give me your e-mail (PM) if you want and I'll email you it.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN MessengerGet your own Servelocity server here
Gufvug



Joined: 14 Aug 2006
Posts: 1
Location: USA

PostPosted: Mon Aug 14, 2006 9:35 am    Post subject: Reply with quote

Where you get it???
_________________
Bible Study Fellowship
Back to top
View user's profile Send private message Visit poster's website Get your own Servelocity server here
Display posts from previous:   
Post new topic   Reply to topic    boards.servelocity.net Forum Index -> Servelocity Guides & Howtos All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Get your own Servelocity Server here



Sponsored by Servelocity Ltd. © 1999-2005 Servelocity Ltd. Powered by phpBB