Q. I'm installing Wordpress blog system under Debian Linux and getting an error which read as follows:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress
How do I fix this problem under Debian Linux?
A.. First make sure MySQL server is running, type the following command at a shell prompt:
# /etc/init.d/mysql status
If MySQL is not running, enter:
# /etc/init.d/mysql start
If MySQL is not installed, type the following command to install MySQL server:
# apt-get install mysql-server
Make sure MySQL module for php5 is installed:
# dpkg --list | grep php5-mysql
To install php5-mysql module enter:
# apt-get install php5-mysql
Just restart Apache2 web server:
# /etc/init.d/apache2 restart
Now PHP support for MySQL should work without a problem. Also make sure you set localhost or 127.0.0.1 as MySQL hostname while performing wordpress installation.
- Email FAQ to a friend
- Printable version
- Rss Feed
- Last Updated: 4-25-08


{ 10 comments… read them below or add one }
I’m having the same problem trying to install on my localhost in Windows XP environment – any tips on how to fix that? I tried the above and that didn’t work. I’m running Apache 2 and PHP MyAdmin 5.2 (I believe). Everything else works fine and I can create and access MySQL databases in PHP MyAdmin without any issues.
The reason it didn’t work is because this is for a linux environment, not Windows.
Thanks, that did it for me.
Thanks for this, I’ve been trying various “fixes” all night, this did the trick for me. Props!
This was super useful. Thanks for the post.
I am trying to install wordpress under debian.
It is not my first installation, neither the second. It always gone ok.
Not I got the same error pointed out here (you can go to the website). I do have php-server installed and running, I do have php5 installed. I do have the module php5-mysql.
And it still gives me the same error.
Who can help me?
Thanks, Mariana
Sorry I wrote “Not I got the same error ..”, I meant “Now I got the same error..”
And also “I do have php-server installed and running”, I meant “I do have mysql-server installed and running”
Thank you for sharing…
nice post..
Biju Subhash
Thanks for shared but I host on godaddy so How can I do with this problem. My host is shared hosting on Window. Can you show me.
Thanks
Thanks so much!
Followed your process, step by step. Worked like a charm first time!