我是WordPress的初学者。我一直在做一个Udemy课程,名为" WordPress主题开发使用Bootstrap"作者Brad Hussey。
我安装了MAMP。然后我按照教程的所有说明通过PHPMyAdmin创建一个新的数据库和一个新的用户帐户。然后我使用正确的凭据适当地编辑wp-config-sample.php文件。我复制了https://api.wordpress.org/secret-key/1.1/salt/中的所有代码并将其粘贴到正确的位置。然后我将文件重命名为wp-config.php。现在,当我在浏览器中转到http://localhost/wp-admin/时,会出现以下错误:
Error establishing a database connection
This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.
Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.
我在wp-config.php文件中输入了正确的用户名和密码。我输入了主机名为" localhost"。并且MySQL服务器正在MAMP上运行。所以,我已经做好了一切。但是不能摆脱这个令人沮丧的问题。请帮我。如果不解决这个问题我就无法继续学习本课程。
我已经看到一些YouTube视频解释了我试图遵循的相同解决方案。它适用于他们,但不适合我。