To make life easier, this profile needs to be created on every MySQL server we log on.
Connect as root and create the following file with correct locations.
cd /
touch /mysql_profile
chmod 600 /mysql_profile
vi /mysql_profile
export ERRORLOG=/local/db/mysql
export DATADIR=/local/db/mysql
export MYCNF=/etc
export SCRIPTDIR=
export BACKUPDIR=/var/mysql-backups
# some useful aliases
alias a='tail -500 $ERRORLOG/mk-stxx-1'
alias h='fc -l'
alias j=jobs
alias k='ls -lh'
alias g='egrep -i'
alias l='ls -alhrt'
alias df='df -h'
alias d='ls -lhrt …
[Read more]