|
We are providing information regarding "Remote Database Access in MySQL" using Cpanel. I am going to explain it with an example. There are two server A and B. You want to access MySQL database of A from B. Please follow the steps given below.
- Step 1: Create User using cPanel and assign required privileges to that user on A.
- Step 2: On server A, click on "Remote MySQL" link on the cPanel homepage and enter IP address of server B. In this way you are allowing remote access of database on A from B.
- Step 3: Use domain name (without http and www) or IP address of domain A in your connection.
For example :
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
You have to replace 'localhost' with domain name or IP address (Example: 'aceweblopers.com' or '66.7.209.124')
|