I installed apache2, php, php5-mysql and mysql-server. When I type http://localhost then everything is ok. But when I type http://localhost/wordpress then this message appears:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
What to do to install mysql extension? I thought that I already did it installing php5-mysql.
Information provided in the official Wordpress may be useful for your issue. Some of which I found fully documented over here:
http://wordpress.org/support/topic/your-php-installation-appears-to-be-missing-the-mysql-extension-which-is-require
Some of the possible solutions includes but not limits to:
The same as:
There are lots of forums and official support threads that refers to that last one as a final solution. But I also suggest you to install a MySQL Administration tool (or workbench, whatever you prefer) in order to make sure your MySQL installation is properly working. Some suggestions can be found in the answers provided right here: Are there any GUIs for Mysql? What is recommended?
First try the trick of the Wordpress Forums, if that does not work I suggest you to check if everything is ok on your MySQL installation and as an additional suggestion, you can find more useful and precise support on the Wordpress Forums just in case that the problem remains after checking that everything is ok in your server.
Good luck!