Hi guys, i have a problem with a remote connection to a mysql database.
I've been after this for a couple of days. I've been reading around but I didn't find any solution which helped me. I have this scenario:

Server A
e-commerce running
mysql database running

Server B
e-commerce running
remote connection to server A database

The two e-commerce are identical. On server A it runs very quick, on server B the connection to mysql database it's about 16 times slower. Some complex queries and mixes queries don't get resolved and let the page go in timeout. I tried a test php script where I connect to mysql and I run a simple query (some classes are required before the query). On server A execution time is 0.107 seconds while on server B it is 1.788 seconds.

- I tried to have the same test with both firewall (server A and B) turned off but the results is exactly the same.
- I added in my.cnf of server A skip-name-resolve and restarted mysql but this didn't really change anything
- I am logging slow queries and none from server B are recorded in the file
- Running the same query from remote ssh connection from server B to server A's mysql is very fast
- Connection is set to persistent on server B's e-commerce

Both server have centos 6.2 installed with WHM/Cpanel, configurations are basically the same.

Do I miss something obvious?