建立数据库连接的WordPress错误 [英] WordPress Error establishing a database connection

查看:89
本文介绍了建立数据库连接的WordPress错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是WordPress的新手,我正在尝试在本地计算机上对其进行设置.

I am new to WordPress, and I am trying to setup it at my local machine.

我收到诸如建立数据库连接出错"之类的错误.

I am getting error like "Error establishing a database connection".

我尝试了WP博客中的所有解决方案,

I tried all solutions from WP blogs,

  1. 创建具有所有特权的新用户

    1. 与root用户一起疲劳.

    1. 多次创建和删除目标数据库.

  • 什么都没有.

    有人知道我可以尝试的其他方法吗?

    Does anyone know anything else I can try?

    推荐答案

    Error establishing a database connection没有比这更简单的了.您的密码,数据库名称,用户名或主机错误.请参阅 http://codex.wordpress.org/Common_WordPress_Errors#Error_ Establishmenting_Database_Connection

    Error establishing a database connection doesn't get any simpler than that. Your password, database name, user name, or host is wrong. See http://codex.wordpress.org/Common_WordPress_Errors#Error_Establishing_Database_Connection

    确定要使用localhost作为服务器吗?您正在使用MAMP还是WAMP?

    Are you sure about using localhost as the server? Are you using MAMP or WAMP?

    尝试在PC/Mac上使用Adminer http://www.adminer.org/来查找数据库名称等,并在需要时管理数据库.

    Try using Adminer http://www.adminer.org/ on your PC/Mac to find the database name, etc., and to admin the database when needed.

    如果您知道可以使用Shell,请尝试登录MySQL服务器并尝试

    If you know can use a shell, try logging into the MySQL server and trying

    mysql> show databases;

    列出所有数据库以检查您的数据库名称.

    to list all databases to check your database name.

    然后尝试

    mysql> mysqlserverinfo --server=root:pass@localhost -d --format=vertical

    以获取端口信息,等等.请参见 http://dev.mysql.com/doc/mysql-utilities/1.6/en/mysqlserverinfo.html

    to get port info, etc. See http://dev.mysql.com/doc/mysql-utilities/1.6/en/mysqlserverinfo.html

    这篇关于建立数据库连接的WordPress错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆