Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: Daniel B. on August 21, 2006, 05:36:10 PM
-
I need for my contrib smeserver-backuppc to dump all the mysql database with the user running the software, which is backuppc. I saw that signal-event pre-backup does this but when invoking with another user that root, even with sudo, the connexion to the mysql server fails with this in the log:
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect
After some research, I foud that this command works
sudo /usr/bin/mysqldump -A -Q -u admin -padmin_password | sudo tee /home/e-smith/db/mysql/mysql.dump
the problem is that I'd like to do this without having to enter the admin password in clear.
Anyone got an idea ?
-
Anyone got an idea ?
HOME=/root sudo /sbin/e-smith/signal-event pre-backup
-
Anyone got an idea ?
HOME=/root sudo /sbin/e-smith/signal-event pre-backup
I got the same problem once when I changed the mysql root password with PHPMyAdmin. After some research I found out how to reset the root password of MYSQL.
Read about the solution here: http://knut.sandvik.bz/2006/08/18/change-the-root-password-of-mysql-on-sme-server-version-7/
-
I got the same problem once when I changed the mysql root password with PHPMyAdmin.
No, you got a different problem (you had "using password: YES"). And I hope you learnt never to change the mysql root password.
-
Luckily it was on my personal webserver and not on any critical systems.
-
HOME=/root sudo /sbin/e-smith/signal-event pre-backup
Thanks a lot CharlieBrady, it's working