Do this test from different sites in your infrastructure.
Install nmap like so,
sudo apt-get install nmap
and then try to scan the database server like so:
From localhost/same machine do
sudo nmap -sS 127.0.0.1
From the same network/other machine close by do (e.G.)
sudo nmap -sS 192.168.X.X
From the Internet do (e.G.)
sudo nmap -sS 80.34.X.X
If the first and second test go well, you have a problem with your router. This problem is then not Ubuntu-related anymore, but a problem with the router you use to connect to the internet.
If the first test fails, your port is completly closed and you have to work on your mysql conf again.
If the first succeeds and the second one fails, recheck that mysql really listens to 3306. Do a
sudo netstat -tlpn
Check that 0.0.0.0 is the source ip for port 3306/tcp. If that is the case you will have to recheck the settings with ufw. Disable the ufw for testing, to see if it makes a difference.