#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Beijing,China
    Posts
    17
    Rep Power
    0
    I installed mysql successfully, but when i exec mysql_connect(),
    " MySQL Connection Failed: Host 'mail.cug.edu.cn' is not allowed to connect to this MySQL server in .."
    why?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 1999
    Posts
    114
    Rep Power
    16
    You need to set your permission tables. Check the manual at http://www.mysql.org/ or the DevShed MySQL forum.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    Beijing,China
    Posts
    17
    Rep Power
    0
    Thanks,
    Scollo,but it's a pity i am a mysql new man. Can u tell me how to set the permission table?

    wangjun
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    56
    Rep Power
    15
    mySQL stores the permission table in a database called mysql. when you first install it, you should be able to get in without any password. do that, and type 'use mysql' to choose the database.

    you can then see the tables and manipulate those to give or deny access.

    peace.
    --Ben
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    London/UK
    Posts
    91
    Rep Power
    15
    even if you are a total newbie you'll still need to understand the permissions to your DB, if you start fiddling with your permissions and mess them up, you could conceiveably leave your DB open to the world
    (by default this in NOT the case)

    However, MySQL > version 3.22.x does have a nice feature called GRANT which does make the changes to the permission easier

    so, from the command line open up the mysql client.

    With the default install, you should be able to get in by:
    mysql -u root

    mysql>GRANT select, insert, update, create, alter, delete, drop
    ON
    *.*
    TO
    user@localhost
    IDENTIFIED BY
    'password';

    now the user 'user' coming from 'localhost' with the password 'password' can do pretty much anything to your database

    personally I would not give this user
    create, alter, drop privs, as they would be things that I would do from the command line, not a php script (in 99% of cirumstances)

    Bealers

Similar Threads

  1. Mysql problem.
    By Nik in forum MySQL Help
    Replies: 54
    Last Post: December 21st, 2006, 07:02 PM
  2. Upgrade from access to mysql
    By karib1 in forum ASP Programming
    Replies: 7
    Last Post: December 16th, 2003, 01:35 PM
  3. Upgrade from access to mysql
    By karib1 in forum MySQL Help
    Replies: 1
    Last Post: December 16th, 2003, 01:27 AM
  4. problem: asp files, from access to mysql
    By karib1 in forum MySQL Help
    Replies: 1
    Last Post: November 26th, 2003, 04:16 AM

IMN logo majestic logo threadwatch logo seochat tools logo