phpMyAdmin "Cannot load mySQL extension"

I have scoured this forum for hours and found problems SIMILAR to mine, tried a LOT of solutions and still have the same problem.

I erased everything. I dumped WAMP. I went from scratch. I installed each system separately. I bought Kevin’s book. I followed it religiously. I updated everything.

Running Windows Server 2003 - all fresh:
Apache 2.2.14 (Win32) PHP/5.3.1
MySQL 5.1.41
phpMyAdmin 3.2.3

I cannot run phpMyAdmin. I get “Cannot load mysql extension. Please check your PHP configuration. - Documentation” and when I enter the password it hangs.

php.ini is correct as far as I can see. I built a phpInfo.php using <?php phpinfo(); ?> and everything looks fine accoring to the many posts.

I’m dyin’ here!

Did you tried these steps:
1- Open your php.ini file on your php folder usually at C:\WAMP\PHP. Look for this line:

;extension=php_mysql.dll

Remove the ; in front of it, will look like this:

extension=php_mysql.dll

Now look for this line:

extension_dir = “c:\php\ext”

ext represent your extension directory, change it according to need and installation.
At the mean time you need to enable mbstring and curl modules as well by uncommenting the following lines on your php.ini file.

extension=php_mbstring.dll
extension=php_curl.dll

Restart Apache now, and you will be OK.

Anyway you can try this at the same time.
http://dev.mysql.com/downloads/gui-tools/5.0.html

AFAIK AMP should load the mysql.dll as default extension.
did you downloaded the wamp from the official site or else ?
I prefer XAMPP than WAMP BTW.

First off, THANK YOU to you both for replying so fast. I really appreciate it. But something is still off target.

I am an experienced programmer but new to Apache, MySQL, PHP and Open Source. The conflicting answers and versions are a bit frustrating. So I bought several of the SitePoint tools. I first followed the WAMP process precisely in Kevin Yanks “Build Your Own…” book and got everything up and going but Apache and phpMyAdmin was running WAY TOO slow and unreliable.

I looked at XAMPP but they made such a big deal out of NOT using it as a production server (which we intend to do) that I decided to go from scratch. So I eradicated it all and started on page 1 again installing each product separately (Win32 Apache 2.2.14, PHP 5.3.1, MySQL 5.1.41, phpMyAdmin 3.2.3).

In his book it says not to use “php_mysql.dll” as you both suggest. It says:

Just above the line for php_mysqli.dll there is a line for php_mysql.dll. The i in php_mysqli stands for improved. You want to enable the new improved MySQL extension. The one without the i is obsolete, and some of its features are incompatible with current versions of MySQL.

Is this wrong? I suppose I could trial-and-error some more but I did that for 6 hours last night. What are the ramifications / concerns if I uncomment BOTH mysql and mysqli? I guess I am looking for some definitive answers rather than my current mode of “guess at solutions until it works”.

And hey, mmarif4u, I am willing to uncomment extension=php_mbstring.dll and extension=php_curl.dll, but do you know what these do?

Thank you againfor your quick help!

That modules are needed by phpmyadmin, thats why need to uncomment it.
Did you tried MySQL tools, the link i provided…that should work without any issues.

But at the mean time also try this, sometime it works:

In the config.inc.php file for PhpMyAdmin change this:

$cfg[‘Servers’][$i][‘extension’] = ‘mysql’;

to this:

$cfg[‘Servers’][$i][‘extension’] = ‘mysqli’;

just a try.

I installed that MySQL GUI stuff right away. It is installed and works GREAT! Is it a functional substitute/replacement for phpMyAdmin?

I don’t think so these are substitute/replacement tools. But AFAIK phpmyadmin is a web interface for MySQL and that tools are application right on your desktop.
Both works great, but i prefer to use that tools on local server and for remote i use phpmyadmin, or use these tools by connecting to remote server too.

Glad it works for you.

Oh, and also, regarding config.inc.php, I followed Kevin Yank’s book exactly as follows:

Using your text editor, create a new file named config.inc.php within the phpMyAdmin
directory, and type the following code into it:
<?php
$cfg[‘blowfish_secret’] = ‘bhvhbv3577h3qguw83qdh37b2fnqelinbq38qhg’;
$cfg[‘Servers’][1][‘auth_type’] = ‘cookie’;
?>

…so there are no other lines in it. I ignored the config.sample.inc.php file.

Should I be using the sample file and adding Kevin Yank’s lines?

…and just to be clear phpMyAdmin still does not work at all. It does not report “Cannot load mysql extension” and it does not hang anymore after entering password - it just refreshes and does nothing.

I did use the ‘sample’ config.inc.php file and change to $cfg[‘Servers’][$i][‘extension’] = ‘mysqli’;

It would be nice to get phpMyAdmin running so I know the site is tight and correct.

Thanks again.

Sounds like you need to uncomment the line mysql.dll

the mysql library in php is obsolete (replaced by mysqli or PDO), however it would seem in this case it is still required by phpmyadmin (and if you read these forums it is still widely used :|)

phpMyAdmin is just another tool, use or not use it at your discretion

usually when there is a xxx.sample.php you copy it to xxx.php and edit to suit yourself, the reason for this is so that the real file does not need to be versioned (possibly a file containing passwords)

Okay! We started with a clean slate. We set up MySQL (5.1.41) on one server - a fresh W2K3 install - call it Toro. It works great.

We have other machines successfully reading/writing the MySQL database stored on Toro using ODBC etc. I can administer it using MySQL Administrator (1.2.17) from the local MySQL machine (Toro) as well as a brand new remote server - call it Saba. However, phpMyAdmin (3.2.4) on remote server Saba will NOT connect to remote MySQL on Toro. There are no errors upon execution. Cool. But after entering the Username and Password, after a while, we get “#2002 - The server is not responding (or the local MySQL server’s socket is not correctly configured)”.

We are not using “root”. We have created an ID named remote-xxxx that has FULL Privileges to every schema in the target database. We have tried root and get the same error. We have tried both an IP address and a machine name in config.inc.php with the same results.

We have tried editing config.inc.php using phpMyAdmin 3.2.4 Setup as well as hand editing. Both mysql and mysqli are uncommented in php.ini.

Summarizing the key issue… we can administer MySQL using MySQL Administrator (1.2.17) from remote server Saba using the remote-xxxx UserName but cannot do the same using phpMyAdmin.

Here is the config.inc.php before you even ask:

<?php
/*

  • Generated configuration file
  • Generated by: phpMyAdmin 3.2.4 setup script by Piotr Przybylski <piotrprz@gmail.com>
  • Date: Sat, 12 Dec 2009 16:21:51 -0600
    */

/* Servers configuration */
$i = 0;

/* Server: Zuke [1] */
$i++;
$cfg[‘Servers’][$i][‘verbose’] = ‘’;
$cfg[‘Servers’][$i][‘host’] = ‘10.168.14.107’;
$cfg[‘Servers’][$i][‘port’] = ‘’;
$cfg[‘Servers’][$i][‘socket’] = ‘’;
$cfg[‘Servers’][$i][‘connect_type’] = ‘tcp’;
$cfg[‘Servers’][$i][‘extension’] = ‘mysqli’;
$cfg[‘Servers’][$i][‘auth_type’] = ‘http’;
$cfg[‘Servers’][$i][‘user’] = ‘’;
$cfg[‘Servers’][$i][‘password’] = ‘’;

/* End of servers configuration */

$cfg[‘DefaultLang’] = ‘en-utf-8’;
$cfg[‘ServerDefault’] = 1;
$cfg[‘UploadDir’] = ‘’;
$cfg[‘SaveDir’] = ‘’;
?>

Have you tried to ping Toro from Saba, within the windows shell?
And what about vice-versa?
Also, what is the network architecture? Are there any hardware/software firewalls within the network path?

This could very well be a networking problem, rather than a MySQL/PHP problem.

Another thought strikes me, and that is, have you tried using “localhost” in your phpMyAdmin config?

Also, I apparently missed your being able to use MySQL admin tools to manage Toro from Saba. oops? scratch one network problem. :smiley: