My SQL Backups
Posted by: uk.tony
Posted on: 2007-01-21 05:05:00
Trying to dump an archive of my MYSQL db using the instructions from the wiki with the following in the shell script
#!/bin/bash
cd /home/user/backups/
mkdir mysql
suffix=$(date +%y%m%d)
mysqldump --opt -udbuser -pdbpass -h mysql-host.domain dbname > mysql/db_user.$suffix.sql
tar -cf archives/user_db_backup.$suffix.tar mysql/*
rm -r mysql/
and for some reason when I run it from the ssh command line I get
mysqldump: Got error: 1045: Access denied for user 'dbuser'@'twizzler.dreamhost.com' (using password: YES) when trying to connect
And yet the 'valid' user credentials I am passing work fine, I can connect using
mysql -hmysql-host.domain -udbuser -p
and entering the password.
So what gives? I've tried a search of the forums and nothings obvious.
TIA uk-Tony