i've got ubuntu server acting as my lamp server for my php websites.
mysql server is installed and opened for the localhost port.
i have read about how to tunnel through ssh to my mysql server.
but i havent understood why this is better than opening the mysql server directly for the internet port.
cause in either way, a hacker could brute force the port for passwords. either mysql port (3306) if opened for the public or ssh (22) if using tunneling.
so why is it better to use ssh tunneling for mysql (and many other server applications)?