Dump database
$ mysqldump --user=root --password=xxxxx thermiq_db >thermiq_db.sql
Restore database
$ mysql --user=root --password=xxxxx thermiq_db
$ mysqldump --user=root --password=xxxxx thermiq_db >thermiq_db.sql
$ mysql --user=root --password=xxxxx thermiq_db
[Warning] Using unique option prefix key_buffer instead of \ key_buffer_size is deprecated and will be removed in a future release. \ Please use the full name instead.
Modify /etc/mysql/my.cnf
key_buffer_size = 16M
http://dev.mysql.com/doc/refman/5.1/en/query-log.html
mysql> SHOW VARIABLES LIKE "general_log%"; +------------------+-----------------------------+ | Variable_name | Value | +------------------+-----------------------------+ | general_log | OFF | | general_log_file | /var/lib/mysql/neqali50.log | +------------------+-----------------------------+ 2 rows in set (0.00 sec) mysql> SET GLOBAL general_log = 'ON'; Query OK, 0 rows affected (0.01 sec) mysql> SHOW VARIABLES LIKE "general_log%"; +------------------+-----------------------------+ | Variable_name | Value | +------------------+-----------------------------+ | general_log | ON | | general_log_file | /var/lib/mysql/neqali50.log | +------------------+-----------------------------+ 2 rows in set (0.00 sec) mysql> SET GLOBAL general_log = 'OFF'; Query OK, 0 rows affected (0.00 sec) mysql> SHOW VARIABLES LIKE "general_log%"; +------------------+-----------------------------+ | Variable_name | Value | +------------------+-----------------------------+ | general_log | OFF | | general_log_file | /var/lib/mysql/neqali50.log | +------------------+-----------------------------+ 2 rows in set (0.00 sec) mysql> exit