dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Remote MySQL access, how?

  1. #1
    Join Date
    Aug 2006
    Posts
    10

    Unhappy Remote MySQL access, how?

    Hello,
    I m not sure and never tried it before, is connecting to another MySQL hosted on different server (remote) can be done same way locally? if not, then how to allow accessing mysql from different server.?
    thanks in advance

  2. #2
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,742
    You just use the domain name or ip of the remote MySQL server as the first argument to mysql_connect() but the server must be configured to allow remote connections otherwise you will need to use a tunnel.

  3. #3
    Join Date
    Aug 2006
    Posts
    10
    So, is the configuration can be made through htaccess, I mean to allow certain ip or domain to access the database?
    would you mind post a link on this topic if you have, I did some search and already not sure,
    I appreciate your help

  4. #4
    Join Date
    Jan 2005
    Location
    Alicante (Spain)
    Posts
    7,742
    Quote Originally Posted by zoromaskcoming
    So, is the configuration can be made through htaccess, I mean to allow certain ip or domain to access the database?
    That is not what I said. I didn't say certain domains are allowed to access the DB, I said "use the domain or IP" [of the SQL server]. Each MySQL server has an IP and if there are any domains pointing at that IP these could be used instead of the IP. Where the connection emanates from is irrelevant.

    The MySQL server itself must be configured to accept incoming connections via these channels rather than just from localhost. This has nothing to do with .htaccess which is pure a configuration file for Apache webservers.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles