Password for CD Database

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Password for CD Database

Postby xfsgpr » 20. August 2009 21:56

I have installed the latest version of XAMPP and everything works fine as explained in Adobe Website. However, I want to see if the sample database for Cd Collection is of any use for me. How do I access it?

When I try to connect via the menu on the left side, I am getting the following error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\xampp\htdocs\xampp\cds.php on line 64

Could not connect to database!
Is MySQL running or did you change the password?

I have looked at Line 64 and it says:

Code: Select all
if(!mysql_connect("localhost","root",""))
   {
      echo "<h2>".$TEXT['cds-error']."</h2>";
      die();
   }
   mysql_select_db("cdcol");
?>


How do I change this so that it allows me to get in?

Thank you.
xfsgpr
 
Posts: 27
Joined: 20. August 2009 21:45

Re: Password for CD Database

Postby Altrea » 21. August 2009 05:11

Extend this line

if(!mysql_connect("localhost","root",""))


with the MySQL-Password, you set for mysql-root-user.

Something like
if(!mysql_connect("localhost","root","password"))


For further information read
http://de2.php.net/manual/en/function.mysql-connect.php
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 55 guests