...
All you need to do is add a new MySQL user that will be allowed to connect remotely to the Plesk database. Here's how:
Connect For that, you must connect to MySQL and run the following command below:
Code Block grant select on <Plesk_database_name>.* to '4psadnsreader'@'<IP address of the DNSManager server>' identified by '<password used to connect>'; flush privileges;
Then replace the following:
<Plesk_database_name> with the database name, usually psa
<IP address of the DNSManager server> with the IP address from where the dump script will connect to the Plesk server
<password used to connect> - with the password used for connection
...
DNSManager server
- Log in to your 4PSA DNS Manager server using your favorite SSH console (e.g. Putty).
Go to
DNSMANAGER_ROOT_D/remote/plesk/
Code Block cd /usr/local/dnsmanager/remote/plesk
In this folder , you will find there's a script called
plesk_export.sh
. Make a copy of this file where all the changes will be applied.Code Block cp plesk_export.sh plesk_windows_export.sh
Open
plesk_windows_export.sh
in your favorite text editor and setdump_file
as follows.Code Block dump_file="/usr/local/dnsmanager/admin/htdocs/dump_full_recs_winsrv.txt"
Search for the
get_config()
function and replace it with the following one below.Code Block get_config() { #check local vars [ -n "$dump" ]||dump="masters" [ -n "$masters2slaves" ]||masters2slaves="yes" [ -n "$dump_masters" ]||dump_masters="no" [ -n "$dump_allow_transfers" ]||dump_allow_transfers="no" [ -n "$dump_soa" ]||dump_soa="no" [ -n "$dump_reverse" ]||dump_reverse="yes" [ -n "$ignore_dns_zones_status" ]||ignore_dns_zones_status="no" mysql_dir='/usr/bin' admin_user='4psadnsreader' admin_passwd='<Password for connection to the Plesk serevr>' server_host='<IP address of the Plesk Widows server>' server_port='8306' OLDVER='0' domainaliases='domain_aliases' }
Replace
admin_passwd
with the correct password andserver_host
with the IP address of the Plesk Windows server. In case the port where MySQL listens to the Plesk server was changechanged, make make sure that the correct port number is added toserver_port
parameter.Save changes
and run the script., then run the following command:
Code Block sed -i 's/-uadmin/-u$admin_user/g; s/-p$admin_passwd/-p$admin_passwd -h$server_host -P$server_port/g' plesk_windows_export.sh
Run the dump script, then log in to
Log in to the 4PSADNSManager and add a new remote update location.
Code Block https://<your_DNSManager_server_IP_address>:8550/dump_full_recs_winsrv.txt
...
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Page properties | ||
---|---|---|
| ||
|
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.