小埋社区

    • Login
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    数据库连接失败怎么解决

    编程
    2
    7
    1129
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 单身狗保护协会会长
      单身狗保护协会会长 last edited by

      网址apsapp.top一个二次开发的表白墙,在提交表白时出现数据库连接失败怎么解决
      Warning: mysqli_connect(): (HY000/1045): Access denied for user 'apaappt1'@'localhost' (using password: YES) in /home/ftp/a/apsappt1/wwwroot/php/connect.php on line 25
      数据库连接失败!

      1 Reply Last reply Reply Quote 0
      • 闲淡酱
        闲淡酱 站长 last edited by

        检查一下数据库信息有没有填错

        单身狗保护协会会长 1 Reply Last reply Reply Quote 0
        • 单身狗保护协会会长
          单身狗保护协会会长 @闲淡酱 last edited by

          @闲淡酱 // 数据库链接配置
          public static $config = [
          // 数据库地址
          "host" => '127.0.0.1',
          // 数据库用户名
          "user" => 'apaappt1',
          // 数据库密码
          "pass" => 'R8wPzc654k',
          // 对应的数据库名字
          "db_name" =>'localhost'
          ];
          这样填不对吗?用户名和密码是正确的

          闲淡酱 1 Reply Last reply Reply Quote 0
          • 闲淡酱
            闲淡酱 站长 last edited by

            是虚拟主机吗?

            1 Reply Last reply Reply Quote 0
            • 闲淡酱
              闲淡酱 站长 @单身狗保护协会会长 last edited by

              @单身狗保护协会会长 在 数据库连接失败怎么解决 中说:

              // 对应的数据库名字
              "db_name" =>'localhost'

              数据库名确认一下

              单身狗保护协会会长 2 Replies Last reply Reply Quote 0
              • 单身狗保护协会会长
                单身狗保护协会会长 @闲淡酱 last edited by

                @闲淡酱 知道怎么回事啦。。。。数据库名手抖了一下多打了一个

                1 Reply Last reply Reply Quote 0
                • 单身狗保护协会会长
                  单身狗保护协会会长 @闲淡酱 last edited by

                  @闲淡酱 知道怎么回事啦。。。。数据库名手抖了一下多打了一个字母,谢谢啦

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  © 2017-2022 小埋社区 All Rights Reserved | 皖ICP备17016228号-2