PhpMyAdmin - MySQL extension missing

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

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

local / phpmyadmin / index.php

And when I call

local / PHPMyAdmin / Settings / index.php

I have two posts where I don't know if it should be like this:

Compression and decompression of Bzip2 requires functions (bzopen, bzcompress) that are not available on this system.

and

Zip decompression requires functions (zip_open) that are not available on this system.

Any suggestions?

+6
source share
10 answers

First make sure you have configured mysql correctly. You can verify this by checking if you can access mysql using the mysql command promp. Therefore, if you are running mysql, it may not be loading. To do this, follow the steps below.

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

<?php phpinfo(); ?> 

The script will tell you where it is. Just look at the path of the downloaded 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 could be C: \ Users \ username \ PHP \ php.ini

Edit the php.ini servers and find the following line. Delete '; from the beginning of the line and restart Apache. Now everything should be fine!

 ;extension=mysql.so 

should become

 extension=mysql.so 

For windows, it will be

 ;extension=mysql.dll 

should become

 extension=mysql.dll 
+8
source

Some Linux distributions have the php_mysql and php_mysqli packages .

+3
source

You need to put the full path in php ini when loading mysql dll, i.e. -

extension = c: /php54/ext/php_mbstring.dll
extension = c: /php54/ext/php_mysql.dll

Then you do not need to move them to the Windows folder.

+3
source

I just add

 apt-get install php5-mysqlnd 

This will require overwriting mysql.so from "php5-mysql".

This work is for me.

+3
source

According to others, you need to remove the " ; " from:
;extension=php_mysql.dll and
;extension=php_mysqli.dll

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

+2
source

Your installation lacks some php modules, there should be a list of necessary modules in readme phpmyadmin. If you recently enabled modules, try restarting the apache / daemon service.

Edit: there seems to be no single “include these modules” in the documents, so include either mysql or mysqli in php.ini (you may need to install it first).

Two messages are not important if you are not going to upload or download the compressed file in phpMyAdmin. If you do, enable the zlib and / or bz2 .

+1
source

In my case, I had to install the extension:

 yum install php php-mysql httpd 

and then restart apache:

 service httpd restart 

This solved the problem.

+1
source

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

 ;extension=mysql.dll 

Your extension is now enabled, but you need to restart appache

 extension=mysql.dll 
0
source

Installing bzip2 and zip PHP extensions solved my problem 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 are required in readme for phpmyadmin.

0
source

I had a similar problem, but that did not help add extension = mysql.so to my php.ini. It turned out that the mysql.so file was not in my extension folder and nowhere on my machine. Having solved this, download the php source and create the extension manually, and then copy it to the extension folder.

0
source

Source: https://habr.com/ru/post/902092/


All Articles