Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    2

    Default Remote mysql on cpanel

    Hi,

    I added my ip to remote mysql, but i still couldn't connect to it remotely.
    I used my domain as host but that didn't work. So what's the host of the database if i want to connect remotely?


    Greetings, Jamie

  2. #2
    Member WebScHoLaR's Avatar
    Join Date
    Dec 2005
    Location
    Planet Earth
    Posts
    506

    Default

    Make sure that you have added that IP that is assigned to you when you connect to Internet. You can verify it at What Is My IP Address - Shows Your IP Address. Once you add the IP, reassign the database user to the database and it will work fine.

    Regards,
    WebScHoLaR

    WebHosting Blog: http://WebScHoLaR.net

  3. #3
    Member arunsv84's Avatar
    Join Date
    Oct 2008
    Location
    India
    Posts
    129
    cPanel/Enkompass Access Level

    Root Administrator

    Default Adding remote IP

    Hi,

    Are you getting any error message? If yes, please paste it here. Also if you cant connect, please contact your hosting provider and ask them to grant permission to your ip . If you have root access to server please execute the following command in mysql.

    grant all on databasename.* to databaseuser@yourip identified by 'databasepass';

    Replace databasename, databaseuser, databasepass and yourip.

    Make sure to use the port number as 3306. You can see it yourself by running the following command as root:

    netstat -lpn | grep mysql

    The hostname would probably be your domain name or hostname of your server or your server IP.

    Hope this helps. Cheers !
    Last edited by arunsv84; 08-07-2010 at 03:59 AM.

  4. #4
    Registered User
    Join Date
    Aug 2010
    Posts
    2

    Default

    I added the right ip address, and i'm not getting any errors.
    I can enter phpmyadmin with cpanel etc, but just remotely doesn't work.
    And with remotely i mean, i have a gameserver on my vps that tryes to connect to the db on my shared hosting package with cpanel. I don't have root acces i only have cpanel.

    I can't do this without cpanel?
    If you have root access to server please execute the following command in mysql.
    grant all on databasename.* to databaseuser@yourip identified by 'databasepass';
    Replace databasename, databaseuser, databasepass and yourip.
    Last edited by Jamie.k; 08-09-2010 at 11:43 AM.

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Posts
    1,928

    Default

    you shared host is probably running a firewall and port 3306 is blocked
    have them white list your VPS IP
    Lowest Host/Empire Technology LLC
    Affordable hosting solutions http://empire-hosting.net
    List Your hosting site FREE in http://hostgeneration.com

  6. #6
    rkj
    rkj is offline
    Member
    Join Date
    Mar 2005
    Posts
    5

    Default

    Hello,

    Dynamic Ips wont work as it keeps changing. Make sure you have a static IP and also make sure its added in the whitelist on your firewall.

Similar Threads & Tags
Similar threads

  1. not able to connect remote MySQL : Remote Database Access Hosts
    By crazyaboutlinux in forum Database Discussions
    Replies: 4
    Last Post: 10-05-2011, 03:55 PM
  2. Failed to remote Cpanel mysql
    By inori0821 in forum Database Discussions
    Replies: 1
    Last Post: 07-12-2009, 02:21 PM
  3. cPanel and remote MySQL
    By krava in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 09-13-2006, 08:02 AM
  4. Replies: 1
    Last Post: 09-17-2005, 12:32 AM
  5. Replies: 4
    Last Post: 12-24-2004, 10:00 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube