Monday, January 26, 2009

alias mysql start and stop in bash for quick and easy startup

Don't forget to sudo -v before actually typing mysqlstart on the command line so that you don't get prompted for your password in the background

drop this the following in ~/.profile

alias mysqlstart='sudo mysqld_safe5 &'
alias mysqlstop='mysqladmin5 -u root -p shutdown'

then type
>source ~/.profile
>sudo -v
>password:
>mysqlstart

No comments: