Wordpress localhost安装错误 - 您的PHP安装似乎缺少WordPress所需的MySQL扩展

 踢出个未来为我鼓掌 发布于 2023-02-09 21:36

我知道这个问题已被问过很多次,但我似乎无法让它工作.我正在尝试在我的本地VM机器上安装wordpress.我有mysql运行正常,如下所示.

    vishal@ubuntu:/etc/apache2$ mysql -u root -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 39
    Server version: 5.1.41-3ubuntu12.10 (Ubuntu)

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

     mysql>

尽管多次尝试我都遇到错误:"你的PHP安装似乎缺少WordPress所需的MySQL扩展"

我试图用myql.so的确切路径取消注释extension_dir,并将扩展名作为mysql.so.

我有两个php.ini文件,我不确定是否正确.一个存在于/ etc/apache2 /phi.ini中,第二个存在于/etc/php5/cli/php.ini中.

/ etc/php5中没有php.ini文件.我尝试了多次安装,但它没有出现在那里.

两者都指的是实际的mysql.so库路径,并提到扩展为mysql.so

有人可以建议可能出错的地方吗?谢谢 !

1 个回答
  • 安装你的mysql mysql库,运行:

     sudo apt-get install php5-mysql
    

    并重启apache:

     sudo service apache2 restart
    

    重试Wordpress安装!

    2023-02-09 21:46 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有