PHPMyAdmin Windows XAMPP 缺少 MySQL 扩展问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6617288/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PHPMyAdmin Windows XAMPP Missing MySQL Extension Issue
提问by yanike
I've tried install Apache, PHP, MySQL, and PHPMyAdmin manually and got the error. Then tried XAMPP and still got the error this error with PHPMyAdmin:
我尝试手动安装 Apache、PHP、MySQL 和 PHPMyAdmin,但出现错误。然后尝试了 XAMPP,但 PHPMyAdmin 仍然出现此错误:
The mysql extension is missing. Please check your PHP configuration. <a href="Documentation.html#faqmysql" target="documentation"><img class="icon" src="./themes/pmahomme/img/b_help.png" width="11" height="11" alt="Documentation" title="Documentation" /></a>
I'm clueless of what the issue is. I've tried solutions on the web and none worked so far. This is a new Windows installation and I installed XAMPP on C:.
我不知道问题是什么。我已经在网上尝试过解决方案,但到目前为止都没有奏效。这是一个新的 Windows 安装,我在 C: 上安装了 XAMPP。
回答by Brad
Fairly simple fix. Find your PHP.ini file, and in it there will be a list of extensions. Look for the one that says mysql and take the ;
off the front of the line.
相当简单的修复。找到您的 PHP.ini 文件,其中会有一个扩展名列表。寻找那个说 mysql 的,然后去掉;
前面的线。
;extension=php_mysql.dll
;extension=php_mysqli.dll
;extension=php_pdo_mysql.dll
If you don't know where your PHP.ini file resides, you can put this code in a script to find out:
如果您不知道 PHP.ini 文件所在的位置,可以将此代码放入脚本中以找出:
phpinfo()
phpinfo()
回答by Chukky Nze
If after you've removed the semi-colons you STILL get this error. Your extension_dir value in php.ini may be the problem simply point the value to extension_dir = "C:\php\ext"
(or wherever you store your php modules), restart your server and you should be fine.
如果在删除分号之后,您仍然会收到此错误。您在 php.ini 中的 extension_dir 值可能是问题,只需将该值指向extension_dir = "C:\php\ext"
(或您存储 php 模块的任何位置),重新启动服务器,您应该没问题。
回答by j99 k99
I had this issue for the longest time on Xampp 7.4
我在 Xampp 7.4 上遇到这个问题的时间最长
I had already uncommented the line, however, what helped changing the
我已经取消了该行的注释,但是,是什么有助于改变
extension=php_mysql
to
到
extension=php_mysql.dll
回答by Imad Ullah
Just add this to your php.ini
只需将此添加到您的 php.ini
extension= php_mysqli.dll
and stop and start apache and MySQL it will work.
并停止和启动 apache 和 MySQL 它将工作。