Last active
August 29, 2015 14:07
-
-
Save phillcoxon/fd1c819e9e6354f7c7b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To set up MySQL backups we need to: | |
1) open up port 3360 in Config Services Firewall but only for the specified remote IP Address | |
See: http://crybit.com/enable-remote-mysql-csf/ | |
Step I : Enable the port 3306 only for the specific IP address: | |
This can be done in the CSF configuration file ‘/etc/csf/csf.allow‘ | |
# vi /etc/csf/csf.allow | |
--- | |
tcp:in:d=3306:s=x.x.x.x | |
--- | |
where x.x.x.x is your IP address | |
Example: | |
[root@server ~]# cat /etc/csf/csf.allow| grep 3306 | |
tcp:in:d=3306=11.20.11.44 | |
OR | |
White-list the IP address in the CSF | |
#csf -a x.x.x.x | |
Then restart csf | |
#csf -r | |
Step II : Restart CSF | |
#csf -r | |
Step III : Add the IP address in remote MySQL in cPanel | |
a) Navigate to Databases section in cPanel | |
b) Click on Remote MySQL | |
c) Add the IP address that you need to add in "Access Hosts" | |
--- | |
Next we need to grant mysql access to that remote IP address: | |
You need to edit your my.cnf file to comment the bind-address and skip-networking lines. | |
Then in mysql: | |
GRANT ALL PRIVILEGES ON *.* TO 'root'@'107.155.122.34' IDENTIFIED BY 'password' WITH GRANT OPTION; | |
Then restart mysql and flush privleges | |
--- | |
Finally in R1Soft backup we enter the MySQL username (root) and password which is found at /root/.my.cnf | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment