On 02/12/2012 05:56 PM, p50...@150ml.com wrote: > hi > > On Sun, Feb 12, 2012, at 11:15 AM, Adrian Reyer wrote: >> Perhaps there are different assumtions on where your mysql.sock resides? >> It doesn't exactly claim 'Permission denied', 'Authorization failed' or >> similar, it might as well be unable to access the socket due to >> permissions or location. >> You could try and connect via tcp/ip to verify, just add the >> DB Address = "localhost"; >> statement to your catalog definition. >> >> Catalog { >> Name = MyCatalog >> dbname = "bacula"; dbuser = "bacula"; DB Address = "localhost"; >> dbpassword = "DBPass" >> } > > modifying, > > # Generic catalog service > Catalog { > Name = MyCatalog > - dbname = "bacula"; dbuser = "bacula"; dbpassword = "DbPass" > + dbname = "bacula"; dbuser = "bacula"; DB Address = > "localhost"; dbpassword = "DbPass" > } > > then, > > service bacula-dir restart > bacula-dir -d -v -t -c bacula-dir.conf > > returns ok, with no error. so, TCP works. > > checking, > > grep sock /etc/my.cnf -B1 > > [client] > socket = > /var/cache/mysql/mysql.sock > > [mysqld_safe] > socket = > /var/cache/mysql/mysql.sock > > [mysqld_secure_installation] > socket = > /var/cache/mysql/mysql.sock > > [mysqld] > socket = > /var/cache/mysql/mysql.sock > > ls -al /var/cache/mysql/mysql.sock > srwxrwxrwx 1 mysql mysql 0 Feb 12 18:08 > /var/cache/mysql/mysql.sock= > > checking, i've verifyied all of my other mysql-socket-using apps are ok > with that specified socket location. > > Q: is bacula presumimg some other location, rather than adopting the > settings in /etc/my.cnf, or the executable's default, > > mysqladmin --print-defaults > mysqladmin would have been started with the following > arguments: > --socket=/var/cache/mysql/mysql.sock --password=###### > --port=3306 > > on a hunch, > > ln -sf /var/cache/mysql/mysql.sock /var/run/mysql/mysql.sock > > and returning > > - dbname = "bacula"; dbuser = "bacula"; DB Address = > "localhost"; dbpassword = "DbPass" > + dbname = "bacula"; dbuser = "bacula"; dbpassword = "DbPass" > > then, > > service bacula-dir restart > bacula-dir -d -v -t -c bacula-dir.conf > > is, now, ok. > > checking, > > grep sock `grep -rlni sock /usr/lib64/bacula` > if ($args{db_socket}) { > $ENV{PGHOST}=$args{db_socket}; > if ($args{db_socket}) { # unix socket is fastest > than net socket > $addr = "socket=$args{db_socket}"; > # db_socket= > > looks like a socket specification can be made. reading @ bacula docs, > > Configuring_Director.html > DB Socket = socket-name > This is the name of a socket to use on the local > host to connect to the database. This directive > is used only by MySQL and is ignored by SQLite. > Normally, if neither DB Socket or DB Address are > specified, MySQL will use the default socket. If > the DB Socket is specified, the MySQL server > must reside on the same machine as the Director. > > it's supposed to use the default socket ... > > specifying the socket manually, > > rm /var/run/mysql/mysql.sock > - dbname = "bacula"; dbuser = "bacula"; dbpassword = "DbPass" > + dbname = "bacula"; dbuser = "bacula"; DB Socket = > "/var/cache/mysql/mysql.sock"; dbpassword = "DbPass" > > and, now, > > service bacula-dir restart > bacula-dir -d -v -t -c bacula-dir.conf > > returns ok. > > as you suspected -- socket location! i'd suspect bacula *should* take > the socket location as specified in /etc/my.cnf, but the manual spec of > socket location in the bacula-dir.conf Catalog stanza is an apparently > working solution. > > thanks a lot.
What I suspect is the socket is find during the ./configure phase. have a look at the output of it, then pretty sure you can pass it as param for the build. You can't expect that mysql cnf file is in /etc/my.cnf could be /opt/mysql/etc /usr/local/etc etc :D -- Bruno Friedmann Ioda-Net Sàrl www.ioda-net.ch openSUSE Member & Ambassador GPG KEY : D5C9B751C4653227 irc: tigerfoot ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users