lonelycastle
Programmer
I've been struggling with this problem for a few weeks. I need to connect to a mysql database on another (remote) server. I've set up the user and granted all permissions, etc. and I can connect to it from some of my other websites, but not from the one I'm working on.
Here's how I granted my permissions:
And here's how I'm connecting:
As I've said I've been able to get this to work on some websites, but not the one's I actually need it for. Here's the mysql_error() I get:
Here's the mysql phpinfo() for said site:
The "MYSQL_MODULE_TYPE" and "Client API version" are the only thing I can think of which might help me solve the problem.
Any thoughs?
Here's how I granted my permissions:
Code:
GRANT ALL ON *.* TO 'user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON *.* TO 'user'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
And here's how I'm connecting:
Code:
mysql_connect('66.246.229.94','username','password');
As I've said I've been able to get this to work on some websites, but not the one's I actually need it for. Here's the mysql_error() I get:
Code:
Can't connect to MySQL server on '66.246.229.94' (111)
Here's the mysql phpinfo() for said site:
Code:
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.49
MYSQL_MODULE_TYPE builtin
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE no value
MYSQL_LIBS no value
Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
The "MYSQL_MODULE_TYPE" and "Client API version" are the only thing I can think of which might help me solve the problem.
Any thoughs?