Connecting to a MySQL server from a different domain

Discussion in 'PHP' started by Weirfire, Mar 3, 2006.

  1. #1
    Currently I have my settings set up this way;


    host = "localhost";
    username = "wf_weir"
    password = "XXXXX"
    db_name = "db_name"

    and it works.

    However I'd like to connect to this same database from another domain.

    The IP is 207.210.84.76 so what settings would I use to connect to this database?
     
    Weirfire, Mar 3, 2006 IP
  2. dct

    dct Finder of cool gadgets

    Messages:
    3,132
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #2
    Just host=207.210.84.76

    You'll also need to ensure that the IP of the other domain has permission to access the server with your database on (this will be set on the database server).
     
    dct, Mar 3, 2006 IP
    Weirfire likes this.
  3. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #3
    Thats what I thought but it's not letting me do that.

    How would I check to see if the IP of the other domain has permission?
     
    Weirfire, Mar 3, 2006 IP
  4. l234244

    l234244 Peon

    Messages:
    1,225
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #4
    In the server with the database, you will need to open port 3306.

    You will have to log into PHPMyAdmin and change the user permissions. Instead of being able to connect by localhost only, you will set it to %, which means they can connect from anywhere.

    PS - This is just some info I saved when trying to connect to one databse from two domains.
     
    l234244, Mar 3, 2006 IP
    Weirfire likes this.
  5. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #5
    Silly question : How do I open port 3306 from the server with the database?
     
    Weirfire, Mar 3, 2006 IP
  6. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #6
    In the firewall rules.
     
    T0PS3O, Mar 3, 2006 IP
    Weirfire likes this.
  7. dct

    dct Finder of cool gadgets

    Messages:
    3,132
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #7
    Do you have cPanel on the db server?
     
    dct, Mar 3, 2006 IP
  8. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #8
    Yes I do dct!

    Where are the firewall rules?
     
    Weirfire, Mar 3, 2006 IP
  9. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #9
    ok I just figured out how to put the % for any access host

    but...

    Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client


    Does this mean the other server has their 3306 port blocked?
     
    Weirfire, Mar 3, 2006 IP
  10. dct

    dct Finder of cool gadgets

    Messages:
    3,132
    Likes Received:
    328
    Best Answers:
    0
    Trophy Points:
    230
    #10
    In cPanel go to the databases section and at the bottom of the screen you should see where to add access for other hosts.

    I haven't got access at the moment so can't give specific instructions.
     
    dct, Mar 3, 2006 IP
  11. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #11
    No that means you get a warning because you're using an old mysql client on the remote client.

    It's only a warning so it might work anyway.
     
    blinxdk, Mar 3, 2006 IP
  12. Weirfire

    Weirfire Language Translation Company

    Messages:
    6,979
    Likes Received:
    365
    Best Answers:
    0
    Trophy Points:
    280
    #12
    Nothing loaded up after that message so it isn't going to work. Thanks for all the help though guys. Appreciate it!
     
    Weirfire, Mar 3, 2006 IP
  13. scaredcrow

    scaredcrow Active Member

    Messages:
    120
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #13
    I'm having the same problem but I don't have cPanel because I'm using helm. I seem can't find how to open the port 3306.
     
    scaredcrow, Apr 27, 2006 IP
  14. netpox

    netpox Active Member

    Messages:
    1,625
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    90
    #14
    I have the same problem, I did the steps above and now i have this message:

    Client does not support authentication protocol requested by server; consider upgrading MySQL client

    Anyone know how to fix it?
     
    netpox, Mar 5, 2007 IP