This is how I setup a new MySQL database for a project (using a local HomeBrew root called sw
):
unset TMPDIR sw/bin/mysql_install_db --verbose --user=dnw \ --basedir=sw/Cellar/mysql/5.5.20 --datadir=sw/var/mysql --tmpdir=/tmp sw/bin/mysql.server start create user [username]@localhost identified by '[password]'; create user [username] identified by '[password]'; grant all on *.* to [username]@localhost; grant all on *.* to [username];