Can you show us the output of running the following command?
sudo grep -r extension /etc/php*/ | grep mysql
Baruch, what happens if you run php on the command line and try to connect to your WP database?
Use either
php -a
Or
php-cgi -a
Then type:
<?php
mysql_connect('localhost', 'wp_user', 'wp_pass');
mysql_select_db('wp_db_name');
?>
Replacing my fake values with real ones of course. If you get any output, show us. If you get no output, the mystery deepens, because that means everything should be working fine.
You can ctrl-c to get back out of the interactive mode.
Er, the Vanilla forum over-escaped my code. The ampersand-lt-semicolon is obviously supposed to be a less-than sign...
Ah, I just noticed your update! Great, glad you're back up and running.
What about with one of these?
php5-cgi -a or
php5 -a
The name of the php binary can vary depending on version, cgi or not, etc. I'd just type php and hit tab a couple of times until a likely candidate was autocompleted.
Search me, Baruch...I'm stumped. Maybe because PHP is integrated in mod_php there's no php executable that can be reached on the command line? I use php with fastcgi so I have the following executables: php-cgi and php5-cgi. One is a symlink to the other, so both are teh same exact thing.
apt-get install php5-cli