sorry for reviving this old thread but now I ran into a problem with this solution after upgrading from debian lenny to squeeze...
the working script was this:
Code:
#!/bin/bash
#Dump new files
USER=root
PASSWORD=myrootpw
HOST=localhost
for i in $(echo 'SHOW DATABASES;' | mysql -u$USER -p$PASSWORD -h$HOST|grep -v '^Database$'); do
mysqldump \
-u$USER -p$PASSWORD -h$HOST \
-Q -c -C --add-drop-table --add-locks --quick --lock-tables \
$i > /root/mysql_backup/$i.sql;
#disabled for now tar czvf /root/mysql_backup/$i.sql.tar.gz -C / root/mysql_backup/$i.sql;
done;
unfortunately after the upgrade I get this error:
Code:
Output: mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES
mysqldump: Got error: 23: Out of resources when opening file './c1zice/wp_1067_terms.MYD' (Errcode: 24) when using LOCK TABLES
I have googled the first error so far and had different suggestions but I thought I'd ask here first.
using:
mysqldump --version
mysqldump Ver 10.13 Distrib 5.1.55, for debian-linux-gnu (x86_64)
mysql Ver 14.14 Distrib 5.1.55, for debian-linux-gnu (x86_64) using readline 6.1
Recent comments
1 day 3 hours ago
1 day 9 hours ago
1 day 13 hours ago
1 day 15 hours ago
1 day 23 hours ago
2 days 9 hours ago
2 days 9 hours ago
2 days 13 hours ago
2 days 17 hours ago
2 days 18 hours ago