Rsync MySQL error log on FreeBSD
The MySQL log on FreeBSD is located at /var/db/mysql/[HOSTNAME].err (replacing [HOSTNAME] with the server hostname). --rsync-path="sudo rsync"
runs the command as sudo
on the other machine (as this file needs root
priveledges to access by default). Rsync this file to your local machine by entering the command below and replacing [SSHHOST] with either the hostname and user login details, or an SSH alias (if using one):
rsync --rsync-path="sudo rsync" [SSHHOST]:/var/db/mysql/[HOSTNAME].err /path/on/local/machine