I am trying to access a MySQL server that is NOT running on x10hosting.com from a script that is running on x10hosting.com. I am able to successfully connect to this database from scripts not run on x10, so I know that the database is configured correctly. I use the following code on scripts, which doesn't work on x10 scripts, but does work on other sites:
<?php
$link = mysql_connect('xxx.xxx.xxx.xxx', 'dbuser', 'dbpassword');
?>
I have also tried the following variation:
<?php
$link = mysql_connect('xxx.xxx.xxx.xxx:3306', 'dbuser', 'dbpassword');
?>
I realize that x10 may disallow remote access to databases hosted on your servers for security reasons. But why can't I connect to remote db's not hosted on your servers?
Incidentally, the motivation for using a database not hosted by x10 is because 1) one of my databases had all the tables deleted, even though it still shows that it has 5 tables in phpmyadmin, and 2) phpmyadmin has been running very slooowly the last 3 days or so.
<?php
$link = mysql_connect('xxx.xxx.xxx.xxx', 'dbuser', 'dbpassword');
?>
I have also tried the following variation:
<?php
$link = mysql_connect('xxx.xxx.xxx.xxx:3306', 'dbuser', 'dbpassword');
?>
I realize that x10 may disallow remote access to databases hosted on your servers for security reasons. But why can't I connect to remote db's not hosted on your servers?
Incidentally, the motivation for using a database not hosted by x10 is because 1) one of my databases had all the tables deleted, even though it still shows that it has 5 tables in phpmyadmin, and 2) phpmyadmin has been running very slooowly the last 3 days or so.
Last edited: