SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error: Host '****' is not allowed to connect to this MySQL server

    Hello,
    First of all, I'm new with MySQL and have a question.
    I tried to connect C# to MySQL but I got an error.

    This is the important code:

    connection.ConnectionString =
    "server=censored.com;"
    + "database=censored;"
    + "uid=censored;"
    + "password=censored;";
    connection.Open ();


    Error message:


    My question is: What did I do wrong? And how can I fix it?

    Hope that helps.

    Yours sincerely,
    Rutger Rauws.

    P.S. I apologize for my bad english.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Access in MySQL is controlled at both a user and host level. You need to allow access explicitly for the computer you're connecting from (or use the wildcard '%' to allow all hosts) with the user you're connecting as.

    http://dev.mysql.com/doc/refman/5.1/en/grant.html


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •