Recently, one of my centos linux servers was hacked and the cause of due to phpMyAdmin. It was said due to this problem PhpMyAdmin vulnerability CVE-2011-2505 (http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2505). What is the best way to login securely into my mysql db? Any idea please.
Use a VPN connection to connect to the network which is hosting the database server.
A database server should never be directly accessible from the public Internet. If it is directly accessible it will be broken in to. It's just a mater of time.