Jump to content

Recommended Posts

Posted

I have tried all combinations of connecting to my database.

 

Access denied for user 'zizuno'@'localhost' (using password: NO)

 

<?php


$server = 'localhost';
$user = 'zizuno_test';
$pass = '***';

$db = mysql_connect($server,$user,$pass) or die(mysql_error());
mysql_select_db("zizuno_test") or die(mysql_error());

?>

 

I created user test for database test, still doesn't work. I am using this code in an include.

Posted

Hi, Zizuno.

 

I am not an admin, and my expertise is not in MySQL. However, I dealt with it a few times in the past.

 

What I've found is that problems will appear as soon as we forget-add something silly.

 

I noticed your error message ends with '(using password: NO)', but in your code you have a line for a password '$pass = '***';'. If I am right, I think either the password most be omitted if it's void, or at least the statement should be for an empty password ($pass = '';).

 

Or you may need to create the password for the database. It could also be interesting if you posted the other ways that did not work before.

 

Best regards,

 

Bad Wolf.

 

Ps: the admin may have another opinion... I would like to see how your problem gets resolved :D

Posted

Why don't you try changing your script from storing the username, etc in variables to passing them directly to the mysql_connect function. The error message you report indicates that no password is provided to use when connecting.

 

$con = mysql_connect("localhost", "myusername", "password123");

Posted

To no avail, that did not work.

 

Edit: I installed SQLbuddy and was able to log into my usernames like that. So my passwords/usernames are not wrong.

Posted

Well I know your script works because I checked it myself before I posted. Go ahead and post your username and domain name and I'll escalate this to djbob.

 

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...