if you can't dump all sql file with mysqldump command, use this method to instead of
1. stop mysql services on original server
# stop mysql
2. on target computer copy all data database and ibdata1 to this host
# mount //X.X.X.X:/var/lib/mysql/ /mnt
# cp -rf /mnt/databasename /var/lib/mysql
# cp /mnt/ibdata1
remember don't copy ib_logfile0 and ib_logfile1
3. start mysql-server services
# start mysql
2012年8月23日 星期四
2012年3月22日 星期四
mysql use utf8 encoding
1.add some parameters on my.conf
#vim /etc/mysql/my.cnf
add two lines on [mysqld] section
default-character-set=utf8
skip-character-set-client-handshake
2.on mysql 5.5 add these into my.conf
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
#vim /etc/mysql/my.cnf
add two lines on [mysqld] section
default-character-set=utf8
skip-character-set-client-handshake
2.on mysql 5.5 add these into my.conf
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
訂閱:
意見 (Atom)