简体   繁体   中英

PHP Owncloud [1045] SQLSTATE[HY000] [1045] Access denied for user 'ownclouduser'@'localhost' (using password: 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.

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);

if you have an "_" in the db name you need to drop the _. example owncloud_db should be entered as ownclouddb in the setup screen of owncloud.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM