Use a text editor (e.g. Joe or Vim) and open this file: /etc/mysql/my.cnf for example:
$ sudo vim /etc/mysql/my.cnf
This file will have a line in it which you need to change.. change [your-server-ip] to your servers IP address:
# change this line from 127.0.0.1 to your ip.
#
bind-address = [your-server-ip]
In order for changes to take effect you will need to restart apache which you can do using the following:
sudo /etc/init.d/mysql restart