MySQL Error number 2003 on Ubuntu 8.04
If you're getting this error and find that you can login locally but not from any other machines, then the problem lies in the configuration file. By default, the my.cnf file has a line that reads:
bind-address = 127.0.0.1
This, by default, has the machine only listening on the localhost. You can check this using netstat -l -t -p. You should find an entry for mysql with TCP and *:mysql. If yours says localhost:mysql then you're only listening locally.
The fix is simple, comment out the line in the my.cnf file by inserting a # before it. That will fix it. With this, there was no need to make any adjustments to apparmor.
This took us 2 hours of researching & lots of cussing only to find it by accident. (That probably means its on page 1 of the documentation.)