Results 1 to 5 of 5

Thread: MySQL database remote access (Access Host)

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    2

    Default MySQL database remote access (Access Host)



    Hi I'm having problem with accessing database from one of my site to another..

    I have one site say a.com and I want to replicate the database from this site to my another site say b.com...

    I'm using Cpanel in both the sites. In site A.com, I have created a user with required privileges and also added the other website (b.com) in the access hosts..

    Now to access a.com database from b.com, I can use the username and password I have created on a.com but I'm not sure what hostname should I use..

    Website a.com use localhost as the hostname..what should I use with b.com..



    Thanks in advace..

    Amit

  2. #2
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,289
    cPanel Access Level

    Root Administrator

    Default

    If a.com and b.com are on the same server, then you can use localhost.

  3. #3
    Registered Member d-woo's Avatar
    Join Date
    Aug 2003
    Posts
    88

    Default

    If they are on different servers, then use the IP address or domain name instead of localhost.

    If the site with the database is a cPanel account, then you will need to give permission for remote access. This is done in cPanel>>MySQL databases

    Look towards the bottom for a section called Access Hosts.

    Start with % (wildcard). Once it works then

    Add the IP address of the server that is wishing to access the database.
    Then delete the wildcard (%)

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    1

    Default

    hello:
    i also have the same problem.
    i already changed the "access hosts"
    but this mysql error shows up
    Code:
    I cannot connect to the database because: Access denied for user 'username'@'domain_ip' to database 'the_DB'
    any input is appreciated.
    thanks in advance

  5. #5
    Registered Member Manuel_accu's Avatar
    Join Date
    Jun 2005
    Posts
    191

    Default

    Hi,

    Code:
    GRANT ALL PRIVILEGES ON `the_DB` . * TO 'username'@ 'domain_ip';
    Ty above sql query from MySQL prompt. and flush the prvileges. Check from your end.

    Thanks,
    Linux Web Administrator Guide
    Optimize, secure and performance tunning for Apache || MySQL5.1 Cluster How To
    The visionary conceives the impossible, The missionary makes it possible. ...Gita.

Similar Threads

  1. Replies: 6
    Last Post: 12-03-2013, 04:12 PM
  2. not able to connect remote MySQL : Remote Database Access Hosts
    By crazyaboutlinux in forum Database Discussions
    Replies: 4
    Last Post: 10-05-2011, 04:55 PM
  3. Delete MySQL Remote Access Host
    By wswd in forum General Discussion
    Replies: 2
    Last Post: 11-19-2008, 03:35 AM
  4. Remote access to MySQL database
    By Djedj31 in forum cPanel Developers
    Replies: 2
    Last Post: 04-03-2008, 05:00 PM
  5. MySQL access from remote host problem
    By electrify77 in forum General Discussion
    Replies: 3
    Last Post: 05-15-2007, 12:23 PM
bargain