Can't log in to db from outside

view story

http://serverfault.com – So when I go to, everything works fine. Same with (external ip)/phpmyadmin but when I want to use my external ip in my code to connect to database it won't connect. Just tells me that the server won't respond. "trying to connect via tcp://(external ip):3306" I have also port forwarded 3306 but no success. Anyone knows how to fix? Due to a comment I add this; I currently have my website locally mirrored to another website and I want the other website to be able to use my local database. EDIT: Fixed it when I allowed port 3306 in my firewall. (HowTos)