Re: [SLUG] MySql question
Simon Bryan wrote: Thanks, I had the impression that 'dump' deleted the database, will try that when I transfer again soon. try "mysqldump dbname some_file_name" and look at what it creates... basically all the sql to recreate your tables and populate the db... later marty -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] MySql question
OK, Samba to the rescue with the copy, but could not get the new database recognised by the mysql server, regardless of mysqladmin, refresh, flush, reload. However when I stop and start the server it works! At 14:28 9/04/2001, Damien Gardner Jnr wrote: On Mon, Apr 09, 2001 at 02:15:33PM +1000, Simon Bryan said: -- mine complains about the mysql#, am I reading that too literally? Hey Simon, Ahh, sorry the first bit was just the shell prompt.. :) from the /var/lib/mysql directory, run: scp -r oldserver:/var/lib/mysql/dbname ./ MySql just stores each database in it's own directory inside /var/lib/mysql, with a separate couple of files (index, data, etc) for each table, so you can just copy the directory across to another machine, and it works fine.. That's assuming you've got ssh access on both machines.. - otherwise you'll have to tar up the directory, ftp it across or something, and un-tar it on the other side.. Hope this helps :) Regards, Damien Gardner Jnr - Dip.EE StudIEAust [EMAIL PROTECTED] - http://www.rendrag.net/ Ph: 0417 055 052 - Fax: 02 6255 8663 -- It's sick the way you people keep having sex without me Simon Bryan IT Manager OLMC Parramatta http://www.olmc.nsw.edu.au -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
[SLUG] MySql question
Hi, Can anyone point me at some resources that describe how to move an MySql database from one server to another? Simon Bryan IT Manager OLMC Parramatta http://www.olmc.nsw.edu.au -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] MySql question
On Mon, Apr 09, 2001 at 01:47:28PM +1000, Simon Bryan said: -- Hi, -- Can anyone point me at some resources that describe how to move an MySql -- database from one server to another? I find that something like the following works well.. newserver:/var/lib/mysql# scp -r user@oldserver:/var/lib/mysql/dbname ./ .. .. .. newserver:/var/lib/mysql# chown -R mysql.mysql dbname - then you just have to add user/db access records to go with if needed, and do a 'mysqladmin reload'.. Regards, Damien Gardner Jnr - Dip.EE StudIEAust [EMAIL PROTECTED] - http://www.rendrag.net/ Ph: 0417 055 052 - Fax: 02 6255 8663 -- It's sick the way you people keep having sex without me -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug
Re: [SLUG] MySql question
This one time, at band camp, Simon Bryan said: Hi, Can anyone point me at some resources that describe how to move an MySql database from one server to another? mysqladmin -h server2 create dbname mysqldump -h server1 dbname | mysql -h server2 dbname you might want to make sure the dump gets the whole database structure before you rely on its integrity -- jamesw Always two there are; a Bastard, and a PFY. -- SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/ More Info: http://slug.org.au/lists/listinfo/slug