Date: 04/21/06 (MySQL Communtiy) Keywords: php, mysql, database, sql * EDIT mysql> SELECT host, user from user; +--------------------------+------+ | host | user | +--------------------------+------+ | localhost | | | localhost | root | | vipindo1.securesites.net | | | vipindo1.securesites.net | root | +--------------------------+------+ 4 rows in set (0.00 sec) What I would like to know is what the are NULL users? When I create a new user using GRANT I dont get a NULL user to match. 2)I want to create a user for my PHP scripts to run. I used this: GRANT SELECT ON vipinjry.* TO user@localhost IDENTIFIED BY 'password'; When I connect from the command line it works fine. However when I use it on a script it does not work, I get an access denied for user error. I am trying to connect to the database using php's mysql_connect() function. I have used my root user to connect and it all works great, its only the users that I create that are not working. Is the host wrong? It's currently set to localhost. Thanks for any help.
|