I am trying to connect to MySQL running on a port other than 3306.
Port 8123 in my case.
I have tried this:
MYSQL_CONNECT(" server.domain.c om:8123","user" ,"password")
And also tried adding this to the top of the file:
ini_set("mysql. default_port", "8123")
I always get a "MySQL cannot connect (111)" error when I issue the
MYSQL_CONNECT() call.
I have verified that the server is running and the user/password is
correct because I can connect to the server from the same machine that
PHP is running on using the mysql utility on the command line
(passing it in the server name, port, user and password). So I know
it's not a permissions issue.
Also - I have temporarily changed the MySQL port back to the standard
3306 and my PHP codes connects fine (when I remove my 8123
references). BTW - I can't leave it at this port but was able to go
back temporarily as a test of my code/username/password/etc.
What is the correct syntax to connect to a MySQL server running on a
non standard port from PHP? Anybody here actually done this?
-tia,
-figmo
Port 8123 in my case.
I have tried this:
MYSQL_CONNECT(" server.domain.c om:8123","user" ,"password")
And also tried adding this to the top of the file:
ini_set("mysql. default_port", "8123")
I always get a "MySQL cannot connect (111)" error when I issue the
MYSQL_CONNECT() call.
I have verified that the server is running and the user/password is
correct because I can connect to the server from the same machine that
PHP is running on using the mysql utility on the command line
(passing it in the server name, port, user and password). So I know
it's not a permissions issue.
Also - I have temporarily changed the MySQL port back to the standard
3306 and my PHP codes connects fine (when I remove my 8123
references). BTW - I can't leave it at this port but was able to go
back temporarily as a test of my code/username/password/etc.
What is the correct syntax to connect to a MySQL server running on a
non standard port from PHP? Anybody here actually done this?
-tia,
-figmo