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 results in 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?

    Thanks in advance for any help,
    Marco
     
    #1 MarcoH64, Oct 28, 2011
    Last edited: Oct 28, 2011
Loading...

Share This Page