[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving MySQL database from one machine to another and remotely accessing dbs?

Martin Waller(martinej.waller@ntlworld.com) is reported to have said:
> Hi,
> I'm using MySQL 4.1 on Etch and have a database (that I created) on another 
> machine (still Sarge) that I want to transfer to the other before upgrading 
> to etch on that machine also. Where should I look to find out how to do 
> this?  Is it just a matter of locating the database and copying or is it 
> more subtle? Are there any security considerations?
> On the security note, I'd also like to be able to access the database from 
> other machines but am unable as by default remote access to the server 
> isn't allowed - again, where should I be looking for information on how to 
> change this?
> The MySQL docs are pretty daunting for a database newby, and I was hoping 
> there'd be some debian-specific documentation somewhere...

If mysql 4 came with man pages, look at man mysqldump.  If not, got to
the mysql web page and download all the docs from there. 

Mysqldump is used to backup your data or for copying databases to
another server.  Like this

$ mysqldunp <db-name> > /backupdir/db-name.date

Look at the db-name.date file.  When run on the other system you just
$ mysql db_name < db-name.date

I just used it, on Mysql 5 to transfer all my databases to a new
server and it's great.  Just be sure no one is using the DB when you
run mysqldump.

:-) HTH, YMMV, HAND :-)


Real Programmers don't write in PL/I.  PL/I is for programmers who
can't decide whether to write in COBOL or FORTRAN.

Reply to: