Title: Install problem with PHP not seeing mysql
Last modified: August 18, 2016

---

# Install problem with PHP not seeing mysql

 *  [texasthunder](https://wordpress.org/support/users/texasthunder/)
 * (@texasthunder)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/install-problem-with-php-not-seeing-mysql/)
 * Ok when I bring up wp-admin/install.php:
 * Your PHP installation appears to be missing the MySQL which is required for WordPress.
 * Now I got MySQL 5 running.
    PHP 5, and Apache 2. All this on FC3.
 * What could I be missing? I don’t want to redo this whole installation thing again,
   but I will if I have to.
 * All the info in wp-config.php I think is right.
    I did exactly what codex.wordpress.
   org suggested in terms of the more detailed installation procedure.
 * Any help would be appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Cypher](https://wordpress.org/support/users/cypher/)
 * (@cypher)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/install-problem-with-php-not-seeing-mysql/#post-222368)
 * You may have PHP, MySQL and Apache all running, but you need the MySql extentions
   for PHP to get access to the database server.
 * On a Linux machine (I’m assuming Fedora here, since you say FC3) you will most
   likely need the “php-mysql” package in addition to just the PHP package.
 * Regards
 *  [masquerade](https://wordpress.org/support/users/masquerade/)
 * (@masquerade)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/install-problem-with-php-not-seeing-mysql/#post-222380)
 * If you compiled PHP from hand, you didn’t use the –with-mysql flag. If its binary,
   you probably need a binary package with mysql support built in
 *  [chrisbrace](https://wordpress.org/support/users/chrisbrace/)
 * (@chrisbrace)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/install-problem-with-php-not-seeing-mysql/#post-222415)
 * Yeah well im having basically the same problems (and getting very pissed off 
   in the process). I have the same setup, FC3, PHP5, MySQL and Apache 2.0.3 . I
   did compile php5 by hand (since my FC3 install of apache includes php4.3.9). 
   I did in fact use the –with-mysql option during my compile and still it does 
   not work.
    I read (somewhere) that PHP5 needs mysql support libraried specifically
   added. I found that my FC3 install does have the php-mysql rpm, however when 
   you look at the 2 files that the RPM installs they appear to be PHP4 libraries.
   So im left downloading and installing to PHP 4.3.11. And still it does not work(
   arggg). I can quite happily get either of my PHP5 or PHP4 versions working with
   apache, compile them with mysql support, they both report installed for mysql.
   But alas still nothing.
 * Sorry i cant help, just thought i’d share what i have found.
 *  Thread Starter [texasthunder](https://wordpress.org/support/users/texasthunder/)
 * (@texasthunder)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/install-problem-with-php-not-seeing-mysql/#post-222446)
 * ChrisBrace:
 * I did a little searching online and came back with this article:
    [http://elizabethmariesmith.com/2005/02/24/hacking-wordpress/](http://elizabethmariesmith.com/2005/02/24/hacking-wordpress/)
 * I don’t know if it’ll give you some new directions but I probably won’t mess 
   around with it. I’m not that experienced with either PHP or MySQL yet anyway.
 * If you want to know my email is boise1945 at hotmail.com if you want to discuss
   this more so we can solve it.
 * Thanks for all your help.
 *  [chrisbrace](https://wordpress.org/support/users/chrisbrace/)
 * (@chrisbrace)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/install-problem-with-php-not-seeing-mysql/#post-222578)
 * Good news I solved the problem today!!!!! Yippee and finally got WordPress working.
   
   How I did it. (Witch hunt begins here). Removed PHP5 (I download and installed
   this by hand). Reinstalled PHP from the FC3 distro (4.3.9 in my case). Startup
   apache. No Go. Enabled logging in PHP to see what the problem was. See nothing.
   Its a connection problem (right?) im sure from PHP to MySQL. Have a look at the
   mysql logs? Nothing. No connection, no nothing. hunt some more. So i created 
   a small test.php to do a connect and select from mysql. When i ran this i got
   an error complaining about Could not connec to MySQL server socket ‘/var/lib/
   mysql/mysql.sock’ (13). Right a little more visibiliy of the problem now. Perhaps
   its a permission issues? Checkout a the mysql.sock file. Its ok. Now i remember
   that i problems with getting just my initial test pages to even show with apache
   and it turned out to be SELinux permissions problem. That was solved with the“
   chcon” command to grant the httpd persmissions to the DOCUMENT ROOT directory
   and that fixed that. With that in mind i found this little gem [http://opendeveloper.org/node/view/191](http://opendeveloper.org/node/view/191).
   We’re getting somewhere now. I modified the /etc/selinux/config file and set 
   SELINUX=disabled. Reboot the box, and when it all came up, presto. Away it all
   went. problem solved – kinda. I dont know that globally turning off SELinux support
   is a good idea. Im sure there is a property that i should set on the …sock.. 
   file for httpd to access it and that would solve the problem. I’ll investigate
   that and repost my findings. ANyway, hope that helps anyone out

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Install problem with PHP not seeing mysql’ is closed to new replies.

## Tags

 * [installation](https://wordpress.org/support/topic-tag/installation/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 5 replies
 * 4 participants
 * Last reply from: [chrisbrace](https://wordpress.org/support/users/chrisbrace/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/install-problem-with-php-not-seeing-mysql/#post-222578)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
