Possible solutions below. 1. Try sudo. 2. How do you connect to MySQL locally, TCP/IP or socket? In that case, you might want to log into MySQL as root and
SELECT User, Host, Password FROM mysql.user; to see if your passwords are OK. My output is as follows: +--------+-----------------+-------------+ | User | Host | Password | +--------+-----------------+-------------+ | root | localhost | | | root | bacula.mydomain | | | | bacula.mydomain | | | | localhost | | | bacula | % | put_pw_here | | bacula | bacula.mydomain | | | bacula | localhost | | +--------+-----------------+-------------+ Users 'root' and 'bacula' don't need to input a password when logging on from my 'bacula.mydomain' Bacula 1.38.9 server - I *think* it won't be broken into (it's not connected to the Internet, I keep it VERYut), and 'root' can't access MySQL from the network. 'bacula' can, for the sole reason that my Apache box running Bacula Web is a separate box, so it must supply the 'put_pw_here' password in order to read data from MySQL. Could it be more secure? Sure. I tried to configure the passwords so that 'root' and 'bacula' had to authenticate when logging on from my Bacula server as well, but for some weird reason the /etc/bacula/make_catalog_backup script wouldn't parse the password argument. But hey, even Oracle 10g allows you to connect as SYSDBA without supplying a password if you're part of the local dba group. --- Will McDonald <[EMAIL PROTECTED]> escreveu: > Hi all. > > I have a problem with a Client Run Before Job script > to backup MySQL > databases which is only occurring when it's called > by Bacula. > > On the Director I have: > > [EMAIL PROTECTED] scripts]# cat /etc/redhat-release; rpm > -qa | grep > bacula; ps aux | grep [b]acula > CentOS release 4.3 (Final) > bacula-mysql-1.38.5-4 > bacula-mtx-1.38.5-4 > bacula 25352 0.0 0.4 39808 2168 ? Ssl > 09:20 0:00 > /usr/sbin/bacula-sd -u bacula -g disk -v -c > /etc/bacula/bacula-sd.conf > root 25357 0.0 0.3 18132 1848 ? Ssl > 09:20 0:00 > /usr/sbin/bacula-fd -u root -g bacula -v -c > /etc/bacula/bacula-fd.conf > bacula 25362 0.0 0.5 60420 2988 ? Ssl > 09:20 0:00 > /usr/sbin/bacula-dir -u bacula -g bacula -v -c > /etc/bacula/bacula-dir.conf > > And the clients are: > > [EMAIL PROTECTED] scripts]# cat /etc/redhat-release; rpm > -qa | grep > bacula; ps aux | grep [b]acula > CentOS release 4.3 (Final) > bacula-client-1.38.5-4 > root 14325 0.0 0.4 38976 2216 ? Ssl > Mar28 13:31 > /usr/sbin/bacula-fd -u root -g bacula -c > /etc/bacula/bacula-fd.conf > > The script runs mysqlshow to build a list of > available databases then > dumps them out to a standard location. It runs fine > from the shell as > root on the client hosts themselves, when called > during a backup > though I see the following: > > 06-Jun 10:56 archive: Start Backup JobId 1045, > Job=devmon1.2006-06-06_10.56.26 > *messages > 06-Jun 10:56 devmon1: ClientRunBeforeJob: > /usr/bin/mysqlshow: Access > denied for user 'root'@'localhost' (using password: > NO) > > Again, running mysqlshow on a client from the shell > as root works perfectly: > > [EMAIL PROTECTED] ~]# mysqlshow > +-----------+ > | Databases | > +-----------+ > | cacti | > | mysql | > | wikidb | > +-----------+ > > The mysql database is passworded and that's > specifcied in > ~root/.my.cnf which has 600 permissions: > > [EMAIL PROTECTED] ~]# cat ~/.my.cnf > [client] > password=correctpasswordhere > > It appears mysqlshow checks the .my.cnf when run > locally but when > called by Bacula it isn't. If I append > -pcorrectpasswordhere to the > mysqlshow in the script then the backup works. I > assume that the > Bacula File Daemon runs clients scripts as root? > > Can anyone suggest what's going on here? > > Will. > > > _______________________________________________ > Bacula-users mailing list > Bacula-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bacula-users > __________________________________________________ Fale com seus amigos de graça com o novo Yahoo! Messenger http://br.messenger.yahoo.com/ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users