I don't know if this is more of a PHP thing or a MySQL user issue that I'm
having trouble with.

I have this code:

/* Connecting, selecting database */
$link = mysql_connect()
        or die("Could not connect:" . mysql_error());
        mysql_select_db("my_database") or die("Could not select database");

I've gone through the MySQL manual step-by-step on how to remove the
anonymous user (I'm using Win32) and add a password for the root user, then
create other users.

The problem is, when I put anything in the mysql_connect() function, I get:
Access denied for user: 'user@host' (Using password: YES)

Where user is whatever user I'm trying to connect with (have tried many) and
host is my server - I've tried both localhost (which gives me "server not
found") and the actual hostname of my computer, which gives me the access
denied.

The weird thing is, this works with -just- mysql_connect(), and the
user/pass combos I'm using I use just fine to maintain and update the
database, i.e. these are known good user/pass combos.

Any idea what's happening?

Jason Soza


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to