[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] MySQL Migration (was Primairy DNS from RAQ2 to RAQ3i)
- Subject: Re: [cobalt-users] MySQL Migration (was Primairy DNS from RAQ2 to RAQ3i)
- From: "Steven Werby" <steven-lists@xxxxxxxxxxxx>
- Date: Thu Jun 29 07:13:04 2000
Hans van Kilsdonk <hans@xxxxxxxxxxxxxx> wrote:
<snip>
> We just bought a new RAQ3i to upgrade from our RAQ2 to the RAQ3i. At the
> moment the RAQ2 is usefull for:
</snip>
> Another thing: To copy the MySQL server, I only need to copy the
>
> /var/lib/mysql
>
> dir to the new server (the new server has MySQL installed). Am I right?
I suppose /var/lib/mysql is the location of your MySQL data directory. You can copy
the data files over, but that's a bad habit to get into. In order for that to work
you'll have to take the RaQ2's MySQL server down b/c if *anyone* is accessing the
files as you copy them they will probably be corrupted. A better solution is to use
the mysqldump program. It takes your table data and converts into a "create table"
statement and a series of "insert" statements which are saved to a file. To load the
table into your RaQ3's MySQL data directory you can do "mysql < mydumpfile" and it
will recreate the table. If you are migrating from a version of MySQL that uses ISAM
table format to one that uses MYISAM, go into the MySQL commandline and enter "alter
table mytablename type=MYISAM" to convert the table to the newer table format so you
can take advantage of its features and benefits. It's also a good idea to run
mysqldump against your tables periodically to back them up so that you can recreate
your tables if you or a user accidentally delete table data, the hard drive gets
corrupted, etc. And for those of you who think your data is invincible, check out
www.phpbuilder.com. It's a very popular site for PHP programmers which was purchased
by internet.com a couple of months ago. They didn't have a single backup and they
lost *everything* a couple of days ago. Search the archives for a post of mine from
a day or two ago concering mysqldump if you would like to know the MySQL book I
recommend and also spend some time on www.mysql.com reading the manual, sign up for
the MySQL mailing list and/or read the MySQL list archives. And if you don't have
time for any of that, I'm available as a consultant to help you migrate your data,
setup a backup scheme, optimize MySQL, optimize table structures, optimize queries...
Steven Werby {steven-lists@xxxxxxxxxxxx}