On Mon, Nov 1, 2010 at 11:07 AM, catkins <bacula-fo...@backupcentral.com> wrote:
> Hello  :)
>
> On a new installation of 5.0.3 with .conf files copied from a working 5.0.1 
> installation.  MySQL 5.1.46.  Slackware64 13.1.
>
> >From the log
> 24-Oct 18&#58;45 bacula-dir JobId 0&#58; Fatal error&#58; Could not open 
> Catalog "MyCatalog", database "bacula".
> 24-Oct 18&#58;45 bacula-dir JobId 0&#58; Fatal error&#58; mysql.c&#58;194 
> Unable to connect to MySQL server.
> Database=bacula User=bacula
> MySQL connect failed either server not running or your authorization is 
> incorrect.
> 24-Oct 18&#58;45 bacula-dir ERROR TERMINATION
> Please correct configuration file&#58; /opt/bacula/etc/bacula-dir.conf
>
> MySQL is running and was previously initialised with:
> r...@cw8&#58;~# /opt/bacula/scripts/grant_mysql_privileges
> &#91;OK&#93;
> r...@cw8&#58;~# /opt/bacula/scripts/create_mysql_database
> Creation of bacula database succeeded.
> r...@cw8&#58;~# /opt/bacula/scripts/make_mysql_tables
> Creation of Bacula MySQL tables succeeded.
>
> Excerpt from bacula-dir.conf:
> Catalog &#123;
> &nbsp; Name = MyCatalog
> &nbsp; # Uncomment the following line if you want the dbi driver
> &nbsp; # dbdriver = "dbi&#58;mysql"; dbaddress = 127.0.0.1; dbport =&nbsp;
> &nbsp; dbname = "bacula"; dbuser = "bacula"; dbpassword = ""
> &#125;
>
> Can log on to database using above username and password:
> r...@cw8&#58;/opt/bacula/etc# cd
> r...@cw8&#58;~# mysql --user=bacula --password= bacula
> Welcome to the MySQL monitor.&nbsp; Commands end with ; or \g.
> Your MySQL connection id is 13
> Server version&#58; 5.1.46-log Source distribution
>
> Copyright &#40;c&#41; 2000, 2010, Oracle and/or its affiliates. All rights 
> reserved.
> This software comes with ABSOLUTELY NO WARRANTY. This is free software,
> and you are welcome to modify and redistribute it under the GPL v2 license
>
> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
>
> mysql> show grants;
> +------------------------------------------------------------+
> | Grants for bac...@localhost&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |
> +------------------------------------------------------------+
> | GRANT USAGE ON *.* TO 'bacula'@'localhost'&nbsp; &nbsp; &nbsp; &nbsp; 
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|
> | GRANT ALL PRIVILEGES ON `bacula`.* TO 'bacula'@'localhost' |
> +------------------------------------------------------------+
> 2 rows in set &#40;0.00 sec&#41;
>
> mysql> quit
> Bye
> Running with debug enabled:
> r...@cw8&#58;~# /opt/bacula/bin/bacula-dir -d 300 -f
> &#91;snip&#93;
> bacula-dir&#58; mysql.c&#58;100-0 db_open first time
> bacula-dir&#58; mysql.c&#58;129-0 initdb ref=1 connected=0 db=0
> bacula-dir&#58; mysql.c&#58;165-0 mysql_init done
> bacula-dir&#58; mysql.c&#58;186-0 mysql_real_connect done
> bacula-dir&#58; mysql.c&#58;188-0 db_user=bacula db_name=bacula db_password=
> bacula-dir&#58; mysql.c&#58;214-0 opendb ref=1 connected=1 db=6e6980
> bacula-dir&#58; sql_create.c&#58;342-0 In create mediatype
> bacula-dir&#58; sql_create.c&#58;345-0 selectmediatype&#58; SELECT 
> MediaTypeId,MediaType FROM MediaType WHERE MediaType='File'
> bacula-dir&#58; mysql.c&#58;235-0 closedb ref=0 connected=1 db=6e6980
> bacula-dir&#58; mysql.c&#58;239-0 close db=6e6980
> &#91;snip&#93;
>
> What to do?
>

Although this is very hard to read on the mailing list your problem
may be that mysql is not listening on the network interface.

John

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to