duanfoumi5620 2015-03-13 21:01
浏览 171

PHP Owncloud [1045] SQLSTATE [HY000] [1045]拒绝访问用户'ownclouduser'@'localhost'(使用密码:YES)

I tried to change the design of my owncloud.

I've copied all the code into XAMPP htdocs and tried to open it.

I get always this error:

[1045] SQLSTATE[HY000] [1045] Access denied for user 'ownclouduser'@'localhost' (using password: YES)

I want to work first with xampp, because I don't want to work on the original code.

  • 写回答

2条回答 默认 最新

  • dongluanban3536 2016-04-25 01:06
    关注

    this code you see is connected to database .you have to know username database and password database and database name to connect on a right way

    //this code need close
    $con = mysql_connect($host,$username,$password)or die(mysql_error());
    $sel = mysql_select_db($database_name);
    
    
    //close code
    mysql_close($con);
    
    //OR
    //it doesn't need close
    $con = mysql_pconnect($host,$username,$password)or die(mysql_error());
    $sel = mysql_select_db($database_name);
    
    评论

报告相同问题?

悬赏问题

  • ¥15 html5+css有人可以帮吗?
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?