Jump to content


Photo

Difficulty Connecting PHP 5.1.2 and MySQL 5.0.18


  • Please log in to reply
1 reply to this topic

#1 Cranky Weasel

Cranky Weasel
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 28 March 2006 - 04:29 PM

From mysqld.log:

060327 22:40:59 mysqld started
060327 22:40:59 InnoDB: Started; log sequence number 0 43655
060327 22:40:59 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.18' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution

From phpinfo ( at URL REMOVED )

mysqli
MysqlI Support enabled
Client API version 5.0.18
MYSQLI_SOCKET /var/lib/mysql/mysql.sock

mysql
MySQL Support enabled

Further details at the link above. Port is 3306.

Socket is present:
srwxrwxrwx 1 mysql mysql 0 Mar 27 22:40 mysql.sock

I can log directly into mysql using the command line:

[root@server mysql]# mysql -u wordpress -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8 to server version: 5.0.18

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>


For the life of me I simply cannot get these two to talk to each other. I've been trying for something like 15 hours, scouring documentation and searching the web, and I have come up empty.

Can anybody suggest anything at all? PHP works, MySQL works... they just won't work together.


I've also overridden the default_socket and default_port settings in /etc/php.ini to no avail.

#2 Cranky Weasel

Cranky Weasel
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 28 March 2006 - 09:31 PM

SOLVED

Problem is SELinux restricting access to the socket. Verified by performing a "setenforce 0".




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users