Admin stuff

    Date: 04/21/06 (MySQL Communtiy)    Keywords: php, mysql, database, sql

    * EDIT
    I figured it out.
    The host name was wrong. I was using localhost when it should have been the host name of the server.
    thanks for the help.



    I just started doing some admin on a MySql database. I was hoping some of you may be able to answer a few questions for me.

    1) My user table has the following rows:

    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.

    Source: http://community.livejournal.com/mysql/93596.html

« DB Structure Theory || Monthly Stats Query »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home