Results 1 to 5 of 5

Thread: MySQL database remote access (Access Host)

  1. #1
    Registered User
    Join Date
    Nov 2006

    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 and I want to replicate the database from this site to my another site say

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

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

    Website use localhost as the hostname..what should I use with

    Thanks in advace..


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

    Root Administrator


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

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


    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


    i also have the same problem.
    i already changed the "access hosts"
    but this mysql error shows up
    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



    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.

    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: 12
    Last Post: 12-18-2014, 12:15 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