The MySQL adapter "mysql" is not available

February 2017

MySQL is a RDBMS which can run as a server in a computer system and can provide multi-user access to one or more databases. Apache and MySQL can be integrated to build software systems where access to databases may be required. Configuration issues may lead to problems in connecting to the MySQL databases. If the MySQL adapter is not available, the php.ini file may be changed to include the parameter for the MySQL adapter in the dynamic extension section. After including the php_mysql.dll, a connection to the MySQL database can be made from a PHP script.


Issue


I was going to install Joomla in XP, but I get the following error message:

"Unable to connect to the database: The MySQL adapter "mysql" is not available".

MySql is running smoothly when I login through the command line. I'm using Apache.

Solution


Try locating and setting the following parameter in your php.ini (it is in the Dynamic Extensions section):

extension=php_mysql.dll 


Prior to this change, I could make a simple php script without mysql run, like this:
<?php   
phpinfo(();   
?> 


but not another one like this

<?php   
echo mysql_connect ('localhost', '<yourwebuser>', '<yourwebuserpassword>');   
?> 


The previous should normally output something like:

Resource id #n 


where n=1 or 2 or

Note: If the database is corrupted and you'd like to know how to import indexes ms sql, you may try this tool: http://www.recoverytoolbox.com/...

Note


Thanks to Kicking_and_alive_at_last for this tip on the forum.

Related


Published by aakai1056. Latest update on March 16, 2012 at 07:02 PM by Virginia Parsons.
This document, titled "The MySQL adapter "mysql" is not available," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).