Hi! This is on a CentOS 7.1, Plesk 12. New.
On Plesk 10.4 I had a script that backed up my MySQL databases separately. The script doesn't work now. I get an error:
Do I need to do something different with this new "MariaDB" thing?
Here's the script:
DB_BACKUP="/pat/to/databackup/`date +%Y-%m-%d`"
DB_USER="admin"
DB_PASSWD="-p`cat /etc/psa/.psa.shadow`"
HN=`hostname | awk -F. '{print $1}'`
# Create the backup directory
mkdir -p $DB_BACKUP
# Remove backups older than 10 days
find /var/www/vhosts/insightplanners.com/docs/databackup/ -maxdepth 1 -type d -mtime +10 -exec rm -rf {} \;
# Backup each database on the system using a root username and password
for db in $(mysql --user=$DB_USER --password=$DB_PASSWD -e 'show databases' -s --skip-column-names|grep -vi information_schema);
do mysqldump --user=$DB_USER --password=$DB_PASSWD --opt $db | gzip > "$DB_BACKUP/mysqldump-$HN-$db-$(date +%Y-%m-%d).gz";
On Plesk 10.4 I had a script that backed up my MySQL databases separately. The script doesn't work now. I get an error:
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
Do I need to do something different with this new "MariaDB" thing?
Here's the script:
DB_BACKUP="/pat/to/databackup/`date +%Y-%m-%d`"
DB_USER="admin"
DB_PASSWD="-p`cat /etc/psa/.psa.shadow`"
HN=`hostname | awk -F. '{print $1}'`
# Create the backup directory
mkdir -p $DB_BACKUP
# Remove backups older than 10 days
find /var/www/vhosts/insightplanners.com/docs/databackup/ -maxdepth 1 -type d -mtime +10 -exec rm -rf {} \;
# Backup each database on the system using a root username and password
for db in $(mysql --user=$DB_USER --password=$DB_PASSWD -e 'show databases' -s --skip-column-names|grep -vi information_schema);
do mysqldump --user=$DB_USER --password=$DB_PASSWD --opt $db | gzip > "$DB_BACKUP/mysqldump-$HN-$db-$(date +%Y-%m-%d).gz";