MySQL 무중단 Dump 뜨기, InnoDB이고 트랜잭션을 사용중일 때
–skip-add-locks –single-transaction –skip-lock-tables
테이블별 사이즈 보기
SELECT table_name, table_rows, round(data_length/(1024*1024),2) as ‘DATA_SIZE(MB)’, round(index_length/(1024*1024),2) as ‘INDEX_SIZE(MB)’ FROM information_schema.TABLES where table_schema = ‘rewardad’ GROUP BY table_name ORDER BY data_length DESC;
셀렉트로 Dump 뜨기
mysql -urad -p@1emdrewarddb -e”select * from account” rewardad > result.sql
MySQL Timezone 설정하기
참고 : http://dev.mysql.com/doc/refman/5.5/en//time-zone-support.html
$ mysql_tzinfo_to_sql/usr/share/zoneinfo | mysql -uroot -p1q2w3e mysql
$ sudo ln -sf /usr/share/zoneinfo/Asia/Seoul/etc/localtime
mysql> set global time_zone=’Asia/Seoul’;
mysql> SELECT @@global.time_zone, @@session.time_zone;