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.

Setup Remote MySQL Host gives errors

Discussion in 'Database Discussions' started by MarcoH64, Oct 28, 2011.

  1. MarcoH64

    MarcoH64 Member

    Joined:
    Oct 4, 2005
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Thailand
    cPanel Access Level:
    Root Administrator
    Hello,

    I have a simple setup with 2 servers. The webserver has cPanel, the MySQL not. Both server have a second private network card with a direct connection (192.168.0.1 & 192.168.0.2).

    MySQL is setup and running on the database server. MySQL is bind to 192.168.0.2 in the my.cnf, networking enabled.

    Privileges have been added for both root@'192.168.0.1' and root@'web1.mydomain.com'.

    I can connect from the webserver on the command line both with mysql & mysqladmin.
    Code:
    root@web1 [/tmp]# mysql -h 192.168.0.2 -u root -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 6
    Server version: 5.5.17 MySQL Community Server (GPL)
    
    Code:
    root@web1 [/tmp]# mysqladmin -h 192.168.0.2 -u root -p status
    Enter password: 
    Uptime: 1275  Threads: 1  Questions: 4  Slow queries: 0  Opens: 33  Flush tables: 1  Open tables: 26  Queries per second avg: 0.003
    
    When i run the Remote MySQL Host setup i enter:
    Remote Server Address: 192.168.0.2
    Remote SSH Port: 22 (not really sure why it needs a SSH port and not the MySQL port???)
    Login as: root
    Authentication method: Password (at least for the initial setup, will change to certificate later)
    - Root password: xxxx

    When i press enter i get:
    Why do i see a connection using localhost in the first error?
    (Could it be because the local MySQL is not running on the web server?)

    Why do i get a mysqladmin connection error, if it does work from the commandline?
     
  2. MarcoH64

    MarcoH64 Member

    Joined:
    Oct 4, 2005
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Thailand
    cPanel Access Level:
    Root Administrator
    Not sure why (i have continued further configuring these 2 servers) but the first error message has now disappeared.
     
  3. MarcoH64

    MarcoH64 Member

    Joined:
    Oct 4, 2005
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Thailand
    cPanel Access Level:
    Root Administrator
    This turned out to be incorrect, i tried it on another server by mistake.

    This issue has now gone into the Support Ticket system.

    For those that have similar problems, for now the result of the ticket was that the Setup Remote MySQL Server process does not (intended) work on a remote server that is not using cPanel.

    Instead of using the Setup script, the manual steps as outlined in the following PDF presentation, starting at page 20, should be followed: http://docs.cpanel.net/twiki/pub/Al...ources/TrainingSlides08/RemoteMYSQLServer.pdf

    PS I don't agree that this is how things should work so i intend to make 1 or more feature requests regarding this once i have completed the manual setup myself.
     
  4. MarcoH64

    MarcoH64 Member

    Joined:
    Oct 4, 2005
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Thailand
    cPanel Access Level:
    Root Administrator
    As someone replied on a feature request thread on this topic, referring to the PDF instructions i posted above, i realized i had forgotten to post the final results of the Support Ticket in this thread.

    The first comments from Support that without a cPanel on the remote MySL server, you could not use the setup script but had to fall back to manual setup where later contradicted by a higher level support engineer and confirmed with the developers.

    Running the setup script with a remote server that does not have cPanel is fully supported and the manual steps in the PDF document are not needed.
     
Loading...

Share This Page