Hi 
I have installed CWP on one server instance and mariaDB on another, I have config the firewall to access DB from the CWP server, Though i even can access DBserverip/phpmyadmin but when i try to login using terminal  its throwing and errir 
ERROR 2003 (HY000): Can't connect to MySQL server on '10.152.59.123' (111 "Connection refused")this could be a reason that i was unable to use a remote msql server by following this link 
http://wiki.centos-webpanel.com/remote-mysql-with-socat-socket