mysql_connect() system error :111
By default mysql server accept connections only from localhost, to change this behaviour you should change in mysql config the bind-address variable in /etc/mysql/my.cnf:

 bind-address=ipAddressOfYourDatabaseServer


than restart mysql server.

 sudo service mysql restart


The explain: http://www.howtogeek.com/howto/mysql/switch-mysql-to-listen-on-tcp/

After this i recommend you, that change your iptables, that your 222 port should be reachable only from your other VPS.

 iptables -A INPUT -s ! yourOtherVPSipAddress -p tcp -dport 222 -j DROP


The other thing: the mysql_ funcrions are deprecated, as the other commenter wrote. If you do not want to make a lot of work with your existing code, you should use mysqli. See the php manual, only a minimal work with sintax if you use mysqli as function library.