mysql_connect()

From: Date: Sat, 08 Jun 2002 21:04:29 +0000
Subject: mysql_connect()
Groups: php.general 
Request: Send a blank email to php-general+get-101297@lists.php.net to get a copy of this message
I posted this to the MySQL list as well, but haven't gotten an answer so far. Just wonderin gif it may be a PHP problem I'm looking at. Anyway, this is the text of the message I posted to MySQL, with a few edits: 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. I also have read the PHP manual concerning the mysql_connect() function and use it accordingly, mysql_connect("host", "user", "pass") 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

« previous php.general (#101297) next »