Tuesday 24 August 2010

ctrl-a and ctrl-b not working in tmux on RHEL 5.5

Rather than moving to the beginning of a line and the end of a line, ctrl-a and ctrl-b were just print ^A and ^B to the screen. Not sure why, I don't really have time to investigate, but this seems to fix the issue when run within the tmux session.

set -o emacs

Wednesday 18 August 2010

MySQL Grants grant and revoke

I'm not really a fan of MySQL but here is a simple problem I always forget the syntax for which is really a SQL issue.

An installation of MediaWiki has an update script which requires the DROP privilege on the database, so I wanted to add the DROP privilege, run the update script and revoke the DROP privilege again.

Here's how:

mysql> show grants for 'username'@'host';
mysql> grant drop on adatabase.* to 'username'@'host';
mysql> revoke drop on adatabase.* from 'username'@'host';

Job's a good-un!