サポート » 使い方全般 » 移行時のDBアクセスエラーについて

  • 解決済 smartat

    (@smartat)


    WordPress移行時に、以下のようなエラーが出ました。

    Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /home/c6126493/public_html/smartdxtest.com/wp-includes/wp-db.php on line 1753
    No such file or directory
    
    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 you have typed the correct hostname?
    Are you sure 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.

    おそらくホスト名が誤っているために出たエラーかと思われますが、
    DBからホスト名を確認し、ホスト名”localhost”を変更してもエラーのままとなってしまい、サイトにアクセスできません。

    どのように設定すればよいのか、ご教示いただけないでしょうか。

2件の返信を表示中 - 1 - 2件目 (全2件中)
  • @smartat さん

    こんにちは。
    一度エラーメッセージを日本語訳してみていただければと思うのですが、書かれている通り、データベース接続に失敗しています。

    また、「wp-config.phpファイル内のユーザー名とパスワードの情報が間違っているか、localhostのデータベースサーバーに接続出来ない」とも書かれています。

    なので、wp-config.phpに記載されている

    • DB_NAME
    • DB_USER
    • DB_PASSWORD
    • DB_HOST

    の設定値があっているか、今一度ご確認下さい。

    トピック投稿者 smartat

    (@smartat)

    ご返信ありがとうございます。
    ホスト名が間違っているようでして、初期ではlocalhostを入れていましたが、DB情報を確認し、ホスト名を入れなおしても同様のエラーとなってしまいます。

    今回は、プラグインでサイトの移行をすることにいたしました。
    ありがとうございました。

2件の返信を表示中 - 1 - 2件目 (全2件中)
  • トピック「移行時のDBアクセスエラーについて」には新たに返信することはできません。