Your mysql configuration file is probably /etc/my.cnf
Make sure your server is running. If not start it with
/etc/init.d/mysql start
Enter mysql command line mode:
mysql -u root -p
Your first password should be blank. You then need to enable remote access with the following command, replace where necessary:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'typeusername'@'localhost' IDENTIFIED BY 'typepasswordhere' WITH GRANT OPTION;
sources:
http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
http://forums.mysql.com/read.php?34,92009,186960#msg-186960
http://ubuntuforums.org/showthread.php?t=252842
http://blog.johan-mares.be/ict/linux/installing-a-virtual-ubuntu-lamp-server-on-mac-os-x-using-virtualbox/