Telnet test to mysql must include the mysqlDB server port.
DB servers usually have restricted access via the mysql DB itself which defines users privl as well as login/passwords and host (ie, clients connecting to it).
Does the DB server have the mysql port blocked from outside access?
nmap -P0 -p 3306 IPorHostnameofDBserver
Would show 'open' if one can connect to the MySQL port on the DB server.
Using a client app (mysql) from the web server, attempt to connect to the DB server using credentials which are all powerful ... ie, root?
mysql -h IPorHostnameofDBServer -u root -p[password]
If you can connect, use 'mysql' and run this query:
select * from host;
Databases themselves could be restricted and allowing only access from localhost ... ie, not your web server.
If you can't connect remotely in either case ... nmap or mysql client, then you have to access the DB server directly. And through whatever interface you have there check the firewall for the DB port and also use whatever mysql client on the DB server to check out permissions for user/hosts, etc.
'spirit of sharing', Ken