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 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:
    446
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    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.
     
Loading...

Share This Page