Bug 726150
Summary: | bacula-dir.conf for mysql support should not point to QueryFile with bad SQL commands | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Edouard Bourguignon <madko> |
Component: | bacula | Assignee: | Andreas Thienemann <andreas> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 15 | CC: | andreas, dnovotny, fedora, fschwarz, gwync, hhorak, mmcgrath, negativo17, vanmeeuwen+fedora |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-07-18 09:29:32 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Edouard Bourguignon
2011-07-27 16:56:39 UTC
It seems like your mysql database configuration is not correct. Try to connect to mysql using user bacula and show all tables: $ mysql -u bacula -p myslq> use bacula; mysql> show tables; Correct result: Tables_in_bacula BaseFiles CDImages Client ... ... Content of query.sql: # # See the file <bacula-source>/examples/sample-query.sql # for some sample queries. # # 1 :The default file is empty, see <bacula-source>/examples/sample-query.sql for samples SELECT 'See <bacula-source>/examples/sample-query.sql for samples' AS Info; How the line starting if : and not ending with ; could be a valid sql query? The last line is ok and do nothing. So even if this file was correct (I don't know may be it is), it's useless. Removing the QueryFile in bacula-dir.conf fix the problem, so if Bacula is working fine and storing cataly in MySQL I can say my database is ok. Or I miss something? But here is the result of the show tables: mysql> show tables; +------------------+ | Tables_in_bacula | +------------------+ | BaseFiles | | CDImages | | Client | | Counters | | Device | | File | | FileSet | | Filename | | Job | | JobHisto | | JobMedia | | Location | | LocationLog | | Log | | Media | | MediaType | | Path | | PathHierarchy | | PathVisibility | | Pool | | Status | | Storage | | UnsavedFiles | | Version | +------------------+ 24 rows in set (0.00 sec) Is it ok? (In reply to comment #2) > Content of query.sql: > ... > :The default file is empty, see <bacula-source>/examples/sample-query.sql for > samples > SELECT 'See <bacula-source>/examples/sample-query.sql for samples' AS Info; > > How the line starting if : and not ending with ; could be a valid sql query? This file is parsed by bacula-dir before executing in mysql. ':' and '*' are characters with special meaning, so this is intentional and probably right. > mysql> show tables; > +------------------+ > | Tables_in_bacula | > +------------------+ > | BaseFiles | > ... > | Version | > +------------------+ > 24 rows in set (0.00 sec) > > Is it ok? It seems ok, have you been connected to mysql using bacula user? I still suspect mysql, at least error message in comment #0 speaks clear: "Unable to connect to MySQL server." You've mentioned you run bacula-dir directly, not with systemd/init script - so you run it under root, but bacula-dir is usually run under bacula user. Here is how I manually start bacula: bacula-dir -c /etc/bacula/bacula-dir.conf -v -f -u bacula -g bacula I don't run it under but as you said under bacula user. But I also try under root same problem. I have no choice to run it directly because systemd/init script is not working. As I said if I comment the QueryFile line in bacula-dir.conf it's working fine so... my main concern is bug #726147 |