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.

[Q] setup remote MySQL server

Discussion in 'General Discussion' started by abdoh2010, Mar 22, 2006.

  1. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    hi every one

    i have to servers i need to work with
    one of them is the university server witch have PHP and Apache
    and the other is my personal server witch have PHP, Apache and MySQL

    now i want to use the university server as a web host and my personal server as a database host

    i tried to setup my server to me a remote MySQL server but i didnt success

    so can you guide me to the way that i can do it with ?

    thank you
     
  2. nothsa

    nothsa Well-Known Member

    Joined:
    Nov 30, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    First, the error message that you're getting would help narrow down the problem. Without the error message, I would check the following:
    1. Can you connect to the MySQL server from your personal server (i.e. connect to "localhost")?
    2. On which port is your MySQL server listening? (default is 3306)
    3. Does your university server's firewall block outgoing connections on that port?
    4. Does your personal server's firewall block incoming connections on that port?
     
  3. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    1. yes
    2. yes
    3. i will ask them about it
    4. no
     
    #3 abdoh2010, Mar 22, 2006
    Last edited: Mar 22, 2006
  4. nothsa

    nothsa Well-Known Member

    Joined:
    Nov 30, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    From your answers, my guess is that either your University server is blocking the outgoing MySQL port, or your personal server is denying you access because you haven't granted user permissions for connections from the university server.

    Again, posting the error message that you're receiving would clear this up.
     
  5. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    can you please list for me the process to make remote mysql server on my personal server


    so i can replace my domain or ip with the localhost at the config file on the university host server

    i think that the problem is that i didnt do it right
     
  6. nothsa

    nothsa Well-Known Member

    Joined:
    Nov 30, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Here's what you need to execute on the MySQL server to give access to the university server:

    GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'university_server.public.IP.address' IDENTIFIED BY 'your_password';

    You might also need to add the university server's hostname (if it has one). Just repeat the command above and replace the IP address with the hostname.

    That should take care of any permission issues. If you still can't connect after that then I woud guess the server is blocking ports. I can't help you any further without an error message. That would tell us once and for all what the problem is.
     
  7. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    i will give it a try
     
  8. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Could not connect to the database server
     
  9. abdoh2010

    abdoh2010 Active Member

    Joined:
    Jan 9, 2005
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    i think that i need to use 'Setup Remote MySQL server' witch i tried to use it many times but it didnt work with me

    this is my try

    ==============================================================

    Setting up Management Scripts... The password you provided is not correct.
    Trace Output: (my@server.com's password:
    Permission denied, please try again.


    sshcmdpermissiondeny)
    Done
    Copying Management Script cpsources.pl...The password you provided is not correct. Retrying Copying Management Script cpsources.pl...The password you provided is not correct. Retrying Copying Management Script cpsources.pl...The password you provided is not correct. Copying Management Script cpanelsync...The password you provided is not correct. Retrying Copying Management Script cpanelsync...The password you provided is not correct. Retrying Copying Management Script cpanelsync...The password you provided is not correct. Copying Management Script updatenow...The password you provided is not correct. Retrying Copying Management Script updatenow...The password you provided is not correct. Retrying Copying Management Script updatenow...The password you provided is not correct. Copying Mysql Script...The password you provided is not correct. Retrying Copying Mysql Script...The password you provided is not correct. Retrying Copying Mysql Script...The password you provided is not correct. Running Mysql Script... The password you provided is not correct.
    Trace Output: (my@server.com's password:
    Permission denied, please try again.


    sshcmdpermissiondeny)
    Done


    server.com is now configured for use as the remote mySQL server.

    ===============================================================

    i went to MySQL Account Maintenance at the cpanel
    and i create an account and database and i conect the together before doing the'Setup Remote MySQL server'

    i'm confuse
     
  10. nothsa

    nothsa Well-Known Member

    Joined:
    Nov 30, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    You don't need to use "Setup Remote MySQL server", and I have no idea what it's done to your server. If you're getting "Could not connect to the database server" error messages then it's probably port blocking as you would get access denied messages if it was connecting.
     
Loading...

Share This Page