SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Oct 2004
    Location
    Newport Beach
    Posts
    1,761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mysql_connect Remote Host

    Alright,

    I just got a second server so I can have one server do all the web stuff and the other all the mysql stuff. I've setup a new cpanel account on the secondary server, running mysql, and given it the usual username, tablename, databasename and password.

    How do I connect to it with mysql_connect? Do I just put in the remote IP address instead of "localhost"?

    Want to make sure I do this right.

    Thanks
    Ryan
    Upcoming Movies - Movie News. Updated Daily.
    Movie Trailers - Awesome trailer site. Nuff said.

  2. #2
    SitePoint Zealot Gar onn's Avatar
    Join Date
    Feb 2011
    Location
    Belgium
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, you could use the IP.

  3. #3
    SitePoint Wizard
    Join Date
    Oct 2004
    Location
    Newport Beach
    Posts
    1,761
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok,

    But do I need to setup Remote MySQL through cpanel/WHM also? What are the advantages of doing so? Doing the remote setup in cpanel seems to better link the two systems, but I'm still unsure.

    Is my idea of just creating another cpanel account and importing the database as is, then accessing it remotely, the better way to go?

    Cheers
    ryan
    Upcoming Movies - Movie News. Updated Daily.
    Movie Trailers - Awesome trailer site. Nuff said.


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
  •