MySQL: Purge binary logs

databases 2 Comments »

So your binary logs have grown to an ugly size eating up most of your servers disk size? The easiest way to truncate the logs in a proper way is to run the following command:

reset master;

Please note: This command works for MySQL >=5, for older versions use flush master;.

Update: There exists a system variable that would automatically purge binary logs older than a given interval. Excerpt from MySQL documentation:

For the binary log, you can set the expire_logs_days system variable to expire binary log files automatically after a given number of days (see Section 5.1.3, “System Variables”).

MySQL: Check slave status

databases No Comments »

In order to check the current status of a MySQL master-slave setup use the following command in the MySQL shell:
mysql> show slave status\G;

An introduction to MySQL master-slave setups can be found here.

MySQL: character set

databases No Comments »

Apply the following settings to my.cnf to use MyISAM as Storage Engine (should be the default though) and UTF8 as default character set:

[mysqld]
..
default-storage-engine = myisam
default-character-set = UTF8

Check if setting the character set worked:

mysql> SHOW VARIABLES LIKE 'character_set%';
mysql> SHOW VARIABLES LIKE 'collation%';

Oracle: Create new schema/user

databases No Comments »

connect SYS as SYSDBA
create user newuser identified by password;
grant connect,resource to newuser;

Oracle Enterprise Manager

databases No Comments »

http://localhost:1158/em/

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in