One mysql db accessed by 2 duplicate websites on separate servers

I’m stumped with this problem…and i hope someone can point me the right direction. I have one mysql db which i want a website located on 2 separate servers to access. One website is fine and can display the data from the database. The other server cannot and reports a ‘can’t connect to db’ message which is contained in the connection file. I can make a manual connection to the db server from the webserver.
mysql -h ‘hostname’ -u ‘username’ -p
I have tried making a copy of the db and using a different account to connect. So its probably missing some add-ons?
I have this installed on the server that cannot display the data from the db
php.i386
php-cli.i386
php-common.i386
php-ldap.i386
php-mysql.i386
php-pdo.i386
php-xml.i386
mysql.i386
mysql-libs.i386
mysqlclient15.i386

Thanks in advance for any guidance

You need to first make sure your mysql server is set up to accept connections from the network, and also make sure your firewall allows incoming connections on port 3306.