MySQL Forums
Forum List  »  PHP

cannot connect to mysql server (13)
Posted by: hoff mann
Date: April 29, 2013 04:37AM

basically, i have a web server (apache in centos installed in host B, and want to connect to a MySQL server in host A) both hosts are in the same subnet.

i can access remote mysql using CLI mysql -u root -h <ip> -p

but cannot connect to mysql using PHP function mysql_connect()

i have already disabled SELINUX and system-config-firewall-tui and included below syntax in /etc/my.cnf

[client]
port =3306
socket = /var/lib/mysql/mysql.sock

a lot of solutions found in the web tells me to type in the setbool associated with selinux, but the thing is, SELINUX is already disabled.

the odd thing is, i can connect thru CLI, but not in php function

also, i have php-mysql in both hosts

Options: ReplyQuote


Subject
Written By
Posted
cannot connect to mysql server (13)
April 29, 2013 04:37AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.