#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    73
    Rep Power
    15
    Hi,

    Could I have my php scripts on server A and connect to the MySQL database on server B?

    If yes, how it would be done? Thanks


    ------------------
    http://new.123finder.com/ - Helps you find cool domains for FREE & Registers it for only $14.95/yr
    http://www.guideclick.com/ - Qualified webmaster resources (affiliate programs, web design, tips)

    ------
    Son
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    81
    Rep Power
    15
    This can be done quite easily. You just need to get an install of MySQL working correctly on server B, and specify in the permissions tables (in the mysql database) that connections from host A are to be allowed. Then, connect to host B from host A using a connect string that specifies the host to connect to is B. Check out all the MySQL docs on this (generally the best place to start anyway). Look at: http://www.mysql.com/documentation/m...l#Adding_users

    The SQL you'll need to set up the right permissions will be something like:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    GRANT ALL PRIVILEGES ON *.*
    TO phpuser@hostA
    IDENTIFIED BY 'some_pass'
    WITH GRANT OPTION;
    [/code]

    That'll give you administrative priviliges as user phpuser on hostA over all databases (*.*) with password some_pass

Similar Threads

  1. Mysql problem.
    By Nik in forum MySQL Help
    Replies: 54
    Last Post: December 21st, 2006, 06:02 PM
  2. mysql connect issue
    By slen in forum MySQL Help
    Replies: 1
    Last Post: February 17th, 2004, 03:33 AM
  3. problem connecting to mysql server on the network
    By ash_freak in forum MySQL Help
    Replies: 3
    Last Post: February 9th, 2004, 04:29 PM
  4. Replies: 1
    Last Post: February 4th, 2004, 11:50 PM
  5. how to connect the oracle server
    By arihandro in forum Oracle Development
    Replies: 1
    Last Post: February 4th, 2004, 08:30 AM

IMN logo majestic logo threadwatch logo seochat tools logo