phpMyAdmin - The MySQL Extension is Missing

2019-01-27 22:33发布

I installed everything separately (Apache, PHP, MySQL and phpMyAdmin) and do not use a compilation, everything works fine till now except phpMyAdmin.

The problem I am experiencing is, that the error message states that the "MySQL extension is missing", as soon as I try to call up:

localhost/phpmyadmin/index.php

And when I call up

localhost/phpmyadmin/setup/index.php

I have two messages where I do not know if it is supposed to be like that:

Bzip2 compression and decompression requires functions (bzopen, bzcompress) which are unavailable on this system.

and:

Zip decompression requires functions (zip_open) which are unavailable on this system.

Any suggestions?

10条回答
祖国的老花朵
2楼-- · 2019-01-27 23:23

Just check your php.ini file, In this file Semicolon(;) used for comment if you see then remove semicolon ;.

;extension=mysql.dll

Now your extension is enable but you need to restart appache

extension=mysql.dll
查看更多
贼婆χ
3楼-- · 2019-01-27 23:27

At first make sure you have mysql installed properly. You can ensure it just by checking that whether you can access mysql using mysql command promp. So if you mysql is working then probably it is not loading. For that follow the steps given below

First of all, you must find your php.ini. It could be anywhere but if you create a small php file with the

<?php phpinfo(); ?>

script it will tell you where it is. Just look at the path of loaded configuration file. Common places include /etc/apache/, /etc/php4/apache2/php.ini, /etc/php5/apache2/php.ini or even /usr/local/lib/php.ini for Windows it may be C:\Users\username\PHP\php.ini

Edit your server’s php.ini and look for the following line. Remove the ‘;’ from the start of the line and restart Apache. Things should work fine now!

;extension=mysql.so

should become

extension=mysql.so

For windows it will be

;extension=mysql.dll

should become

extension=mysql.dll
查看更多
啃猪蹄的小仙女
4楼-- · 2019-01-27 23:28

Installing bzip2 and zip PHP extensions solved my issue in Ubuntu:

sudo apt-get install php7.0-bz2
sudo apt-get install php7.0-zip

Use php(you version)-(extension) to install and enable any missing modules that is required in the phpmyadmin readme.

查看更多
Evening l夕情丶
5楼-- · 2019-01-27 23:31

Just as others stated you need to remove the ';' from:
;extension=php_mysql.dll and
;extension=php_mysqli.dll

in your php.ini to enable mysql and mysqli extensions. But MOST IMPORTANT of all, you should set the extension_dir in your php.ini to point to your extensions directory. The default most of the time is "ext". You should change it to the absolute path to the extensions folder. i.e. if you have your xampp installed on drive C, then C:/xampp/php/ext is the absolute path to the ext folder, and It should work like a charm!

查看更多
登录 后发表回答