Announcement

Collapse
No announcement yet.

Connect MySql Database From remote machine

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Connect MySql Database From remote machine

    Many times (Web/Desktop)Application developers need to connect to MySql database server hosted on remote cPanel server to be accessed from their desktop.

    Here are the instructions to connect to MySql Database from remote Machine.

    => Enable Connection to Remote Host

    - Login to cPanel of the domain
    - Go to 'Remote MySql'
    - At 'Remote Database Access Hosts'
    - add access host IP (i.e. IP of the machine from which database has to be accessed)
    - Click on 'Add Host' to finish.
    => Configuration

    Database Server = Server IP address
    Database = cpanelusername_databasename
    Database User = cpanelusername_databaseuser
    Database Password = (what ever is set)
    MySql Serverice Port no. = 3306
    => What if local machine has dynamic IP

    - Simpy put '%'(percentage mark) in Add Access Host to allow access from any remote IP.
    - Allow subnet only 215.26.%.% (This may be useful if machines having remote access to
    Database belongs to same Subnet/ISP).

    => It is recommended to have Static IP if remote connection to database is permanent OR
    keep updating IP, if dynamic, into the access host list whenever it changes. This is
    secure way for remote connection and to avoid access to unwanted IPs.

    *Your IP may need to be allowed the access to 3306 port in the firewall of the server.
    Last edited by Keyon_S; 04-10-2010, 12:59.
Working...
X