The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remote mysql on cpanel

Discussion in 'Database Discussions' started by Jamie.k, Aug 6, 2010.

  1. Jamie.k

    Jamie.k Registered

    Joined:
    Aug 6, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth
    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.
     
  3. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    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 !
     
    #3 arunsv84, Aug 7, 2010
    Last edited: Aug 7, 2010
  4. Jamie.k

    Jamie.k Registered

    Joined:
    Aug 6, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
    #4 Jamie.k, Aug 9, 2010
    Last edited: Aug 9, 2010
  5. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    you shared host is probably running a firewall and port 3306 is blocked
    have them white list your VPS IP
     
  6. rkj

    rkj Registered

    Joined:
    Mar 4, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
Loading...

Share This Page