location of mysql database files?

Harold Hallikainen harold at hallikainen.com
Thu Aug 11 18:53:13 UTC 2005



>
> The only _reliable_ method for moving mysql data from machine to machine
> is via mysqldump/mysqlrestore or by using the replication tools in the
> later versions of mysql.  Moving the data files around is not
> recommended--especially with a live database.  If you can stop it while
> you move the binary files, then you're OK, but don't do it while mysql
> is running.
>
> BTW, the default location for the data files is
>
> 	/var/lib/mysql/name-of-database
>
> Inside each directory, the files are named *.frm, *.MYD, and *.MYI,
> where the asterisks are replaced by the table names.  10 tables yields
> 30 files (a .frm, a .MYD and a .MYI for each)
>


I tried copying the mysql files over from the RH8 machine to the FC4, and
it LOOKS like it worked, but the owners have changed from harold to root
(I have to use -uroot in mysql to see the databases). Is user info and
database ownership info in the same location as the databases? I may still
go the export/import route, but I'm trying to use rsync to keep a backup
server in sync with another.

THANKS!

Harold

-- 
FCC Rules Updated Daily at http://www.hallikainen.com




More information about the Redhat-install-list mailing list