SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Grant privileges : '%.yourname.com' instead IP

    GRANT ALL PRIVILEGES ON *.* TO USERNAME@'%.yourname.com' IDENTIFIED BY 'PASSWORD';
    I am trying to replace IP with '%.yourname.com' so I don't have to rely on IP.

    In the configuration, I replaced 'localhost' with 'neptune.yourname.com', but I couldn't get it to connect.

    According to the manual, '%.yourname.com' should allow <anything>.yourname.com to connect.

    Did I do anything wrong?

  2. #2
    SitePoint Zealot newspire's Avatar
    Join Date
    Mar 2005
    Location
    Houston, TX
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would need to see the error message returned by the client to be sure, but it sounds like the client is connecting to 'localhost' or '127.0.0.1'. You may also have an entry in /etc/hosts (assuming Linux) that maps neptune.yourname.com to '127.0.0.1'.

    Connecting to localhost is not the same as connecting to the hostname.

  3. #3
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I've found the mistake.

    'neptune.yourname.com' is the hostname of the web server, not the hostname of the MySQL server.

    I have replaced the IP of the MySQL server with the hostname of MySQL server without any problem.


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
  •