Tuesday, March 22, 2011

Mysql tips

Reference: http://souptonuts.sourceforge.net/readme_mysql.htm

  Clean up binary log files.  For a default install they may be in

/usr/local/var/
or
/var/lib/mysql/

with names ending in -bin.000001,-bin.000002,.. The following
command may help find out where the logs are located.

mysql> show variables like '%home%';
+---------------------------+-----------------+
| Variable_name | Value |
+---------------------------+-----------------+
| bdb_home | /var/lib/mysql/ |
| innodb_data_home_dir | |
| innodb_log_group_home_dir | ./ |
+---------------------------+-----------------+


mysql> reset master;
reset master;
Query OK, 0 rows affected (0.02 sec)

See (Tip 24:) details working with binary log files and (Tip 25:) explains
how to setup logging. (Tip 37:) shows have to setup MASTER and SLAVE
replication.

No comments: