Results 1 to 10 of 10
  1. #1

    Database sharing from remote server..


    I want to know how I can access another database fro another site I have on another server ?

    I'm presuming I would need to change "localhost", but what would I chnage it to ?


  2. #2
    I would recommend changing it to the main IP of the remote server.

    Using the hostname would be ok too but sometimes DNS problems can entail.

  3. #3

    Would I use only the IP address, no hosting account usernames or anything else (not database username) ?


  4. #4
    your would still need to log onto the Database

    So yes you would set it up as usual only changing "localhost" to the remote server IP

    There is no need to specify the hosting account on the server, just the database name, database username and the password

    EDIT: IMPORTANT: Also make sure you add an access mask to allow connections from your server on the Remote SQL Server.

  5. #5
    Thank you friend.

    Only, now I don't know what access maskingis or how to achieve it.
    Sorry, bit of a newbie with this stuff.

  6. #6
    No problem,

    The MySQL command you need to run on your remote server is GRANT

    you would use

    GRANT [command list] on [database].* to [user]@[host] identified by [password];

    So to connect to a Database of "test" with the username "joe" on your server IP of "123.456.789.012" and password "test"

    you would use :

    GRANT SELECT, INSERT, DELETE, CREATE ON test.* TO [email protected] IDENTIFIED BY 'test';


    If you have Cpanel, you can go to "Manage MySQL" and add your Server IP... which is a lot lot easier

    Hope this helps

  7. #7


    Thank you so much.

  8. #8
    No Problem

  9. #9
    Join Date
    Aug 2003
    Vancouver, BC

    You should write this up as a how-to if it hasn't been done already.
    Gary Jones - Canada Web Hosting

  10. #10
    Actually thats a good idea.

    Ive noticed a lot of others confused about the GRANT/REVOKE commands.

    Ill get started on it

Posting Permissions

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