"Bill Karwin1" wrote:
Carlos Eduardo Peralta wrote: Hello:
Can i update a MySQL database with just copy the files MYI
MYD and FRM in the right dir? I know this work.
This is not safe to do in general. MySQL might have data in
memory that
it expects to write to the files. Changing the files outside
of control
of mysqld creates a risk of losing unsaved data. If this has
worked for
you in the past, I would describe this as, "you haven't lost
any data
_yet_."
I recommend that everyone use the backup & restore tools to
update a
database. Read this page and its sub-sections:
http://dev.mysql.com/doc/mysql/en/di...revention.html
The question is how MySQL manage
the user that are usig that database in that moment. Can i
close all the connection to that database? How can i tell MySQL deamon
that donīt use that database any more?
If you need to forcibly disconnect a user connection from a
running
database, to prepare it for maintenance, read these pages:
Using the command-line interface:
http://dev.mysql.com/doc/mysql/en/kill.html
Using MySQL Administrator GUI interface:
http://dev.mysql.com/doc/administrat...nnections.html
Regards,
Bill K.
Bill,
Backup /restore work fine for smaller databases. For larger
databases, they bring the server down to its knees. Then I think it
is actually better to take the disk image, and back it up. Of course,
mysqld has to be totally shutdown (good or bad depending on what is
being done with the mysql...). Taring when others are chaning the
data is not good.
In answer to Carlos, you can shutdown mysqld if you have root access.
--
Posted using the
http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL:
http://www.dbforumz.com/mySQL-replac...ict213566.html
Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbforumz.com/eform.php?p=741483