Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use (access) a MySQL database on a different (remote) server (cPanel)
07-15-2012, 12:06 PM,
#1
How to use (access) a MySQL database on a different (remote) server (cPanel)
Step 1. Set up remote access hosts in WHM
Step 2. Do the same in cPanel for the user that owns the databese
if the above is not enough
Step 3. edit /etc/my.cnf and remove skip-networking
and if still doesn't work
Step 4. Log into the server you will access the database from and open up port 3306 in the firewall for outgoing traffic
Reply
08-14-2012, 10:51 AM,
#2
Host 'host_name' is blocked - Unblock with 'mysqladmin flush-hosts'
With SVC you may get some MySQL connection errors and after a certain number of interrupted connections between Server A (webService) to Server B (SQL Database), you may get blocked and your php scrips may come back with an error like the following:
Quote:Host 'host_name' is blocked because of many connection errors.
Unblock with 'mysqladmin flush-hosts'
More info here: http://dev.mysql.com/doc//refman/5.0/en/blocked-host.html

By default, mysqld blocks a host after 10 connection errors. You can adjust the value. Go to your SQL server (Server B) and
  • edit /etc/my.cnf and insert this value:
    Code:
    max_connect_errors=10000
  • save my.cnf
  • restart mysqld ( /etc/init.d/mysqld restart )

test your SQL connection (or SVC) and it should connect
I love video chat!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)