gpt4 book ai didi

升级到 MAMP v 3.5 后出现 SQL 错误

转载 作者:行者123 更新时间:2023-12-04 13:44:02 25 4
gpt4 key购买 nike

我有一个运行脚本来创建 Wordpress 网站。一切运行良好,直到我到达:

wp core install --title=$client --url=$client.local --admin_user=$clientshort-admin --admin_password=******** --admin_email=********@gmail.com

我得到以下信息:

Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /Applications/MAMP/htdocs/pndesign2/web/wp/wp-includes/wp-db.php on line 1488
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /Applications/MAMP/htdocs/pndesign2/web/wp/wp-includes/wp-db.php on line 1518
Warning: mysql_connect(): No such file or directory in /Applications/MAMP/htdocs/pndesign2/web/wp/wp-includes/wp-db.php on line 1518
Error: Error establishing a database connection

谢谢!

最佳答案

兜兜转转,归结为OSX/MAMP/和WP-CLI的PHP版本差异。用 MAMP 的版本更新你的 .bash_profile 解决它 - 更多细节在这里 How to override the path of PHP to use the MAMP path?

关于升级到 MAMP v 3.5 后出现 SQL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34316448/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com