이 블로그 검색

월요일, 6월 25, 2012

[Linux] mysql data migration

to find out where the mysql data located,
#vi /etc/my.cnf
datadir=/var/lib/mysql/

in order to backup the data,
#tar fvcz mysql.bak.tar.gz /var/lib/mysql

and go to the new server, on your directory or desired one,
#tar fvxz mysql.bak.tar.gz

doing this, all the mysql accounts will be transffered as well.
Check if you can connect to mysql with your credential you used to use on the old server.


댓글 없음:

댓글 쓰기