phpMyAdmin - 缺少 MySQL 扩展

2022-01-05 00:00:00 php mysql phpmyadmin

我单独安装了所有东西(Apache、PHP、MySQL 和 phpMyAdmin)并且不使用编译,到目前为止一切正常,除了 phpMyAdmin.

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

我遇到的问题是,一旦我尝试调用,错误消息就会指出缺少 MySQL 扩展":

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

localhost/phpmyadmin/index.php

当我打电话时

localhost/phpmyadmin/setup/index.php

localhost/phpmyadmin/setup/index.php

我有两条消息,我不知道它是否应该是这样的:

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

Bzip2 压缩解压需要函数(bzopen,bzcompress) 在此系统上不可用.

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

和:

Zip 解压需要的函数 (zip_open) 不可用在这个系统上.

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

有什么建议吗?

推荐答案

首先确保你已经正确安装了 mysql.您可以通过使用 mysql 命令提示符检查您是否可以访问 mysql 来确保它.因此,如果您的 mysql 正在运行,那么它可能没有加载.为此,请按照下面给出的步骤

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

首先,你必须找到你的php.ini.它可以在任何地方,但如果您使用

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(); ?>

脚本它会告诉你它在哪里.看看加载的配置文件的路径.常见的地方包括/etc/apache/,/etc/php4/apache2/php.ini,/etc/php5/apache2/php.ini 甚至/usr/local/lib/php.ini 对于 Windows 它可能是 C:用户用户名PHPphp.ini

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:UsersusernamePHPphp.ini

编辑您服务器的 php.ini 并查找以下行.从行的开头删除;"并重新启动Apache.现在一切正常!

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

应该变成

extension=mysql.so

对于 Windows,它将是

For windows it will be

;extension=mysql.dll

应该变成

extension=mysql.dll

相关文章