How to: Add a low privilege user in mysql

Considering I have to do this every few months, I note this down:

create user username identified by 'password';
// Or you can do 
// GRANT ALL ON USERNAME.* TO 'DBNAME'@'HOSTNAME' IDENTIFIED BY 'PASSWORD';
GRANT SELECT, INSERT, UPDATE, DELETE ON USERNAME.* TO 'DBNAME'@'HOSTNAME' IDENTIFIED BY 'PASSWORD';
flush privileges;

Postgresql 8.04 installation (from source) note

A friend of mine at the UW asked me for help to install Postgresql on dante yesterday, while the steps are quick straight forward, it will be beneficial for others to get it up and running quickly.

First, download the postgresql package and I choose to download the latest version.

wget wwwmaster.postgresql.org/redir/198/h/source/v8.4.0/postgresql-8.4.0.tar.bz2

//Once you finish downloading, decompress the file. Make sure you place them in the appropriate place. 
tar xjvf postgresql-8.4.0.tar.bz2

//Now navigate to where the files were decompressed, then configure the source. Assuming you placed all the files at `pwd`/postgre, you will then run the following command:

// By specifying the prefix to local path, you are telling the system to not to put the bin files on system level folders. 
./configure --prefix=//postgre

This will take a long, once configured, compile the src. 
make & make install

// Till this step, you should have postgreSQL installed. 
// Initialize a database and store the data at postgre/data
./initdb -D /da42/d18//postgre/data

// Create a new database, namely testdb
./createdb testdb

// All set, now start postgre
./postmaster -D ../data/

// Or you can set it to run automatically
./pg_ctl -D ../data/ -l ../server_log start

// Finished, now you can access the database
./psql testdb
^ Top of Page