Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

remote mysql server don't work

Discussion in 'General Discussion' started by upsforum, Sep 7, 2007.

  1. upsforum

    upsforum Well-Known Member

    Joined:
    Jul 27, 2005
    Messages:
    471
    Likes Received:
    0
    Trophy Points:
    166
    Hi,

    I set a remote server additional mysql db,

    I set IP remote server, I set password root of remote server and I try connect to this:


    $db_host = "IPREMOTESERVER";
    $db_user = "usernamerootserver";
    $db_password = "passwordrootserver";
    $db_name = "databasename";

    But I get a error permission denied
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,051
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    Earth
    You will have to replace the db username/password with the one you have created and assigned to the database. If you haven't assigned a user to the database, you can either do it from the control panel you have or you can do it from Mysql prompt using the below command:

    GRANT ALL PRIVILEGES ON databse.* TO 'username'@'%' IDENTIFIED BY 'newpassword';

    Also you will have to check whether the other server allows remote access to databases.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice