Most of mysql servers has set passwords for their users especially for
root account. I think it would make sence if mysql scripts provided with
bacula would ask for password by default. Now all these scripts end with
a message that access was denied and nothing suggests that you must use
'-p' option.
Lukáš Nykrýn
diff -up bacula-5.0.3/src/cats/create_mysql_database.in.old bacula-5.0.3/src/cats/create_mysql_database.in
--- bacula-5.0.3/src/cats/create_mysql_database.in.old 2011-10-06 12:48:04.883972243 +0200
+++ bacula-5.0.3/src/cats/create_mysql_database.in 2011-10-06 12:48:52.056382504 +0200
@@ -6,7 +6,7 @@
bindir=@SQL_BINDIR@
db_name=@db_name@
-if $bindir/mysql $* -f <<END-OF-DATA
+if $bindir/mysql -p $* -f <<END-OF-DATA
CREATE DATABASE ${db_name};
END-OF-DATA
then
diff -up bacula-5.0.3/src/cats/drop_mysql_database.in.old bacula-5.0.3/src/cats/drop_mysql_database.in
--- bacula-5.0.3/src/cats/drop_mysql_database.in.old 2011-10-06 12:48:04.886972204 +0200
+++ bacula-5.0.3/src/cats/drop_mysql_database.in 2011-10-06 12:48:52.098381980 +0200
@@ -7,7 +7,7 @@ bindir=@SQL_BINDIR@
db_name=@db_name@
if test xmysql = x@DB_TYPE@ ; then
- $bindir/mysql $* -f <<END-OF-DATA
+ $bindir/mysql -p $* -f <<END-OF-DATA
DROP DATABASE ${db_name};
END-OF-DATA
if test $? -eq 0 ; then
diff -up bacula-5.0.3/src/cats/drop_mysql_tables.in.old bacula-5.0.3/src/cats/drop_mysql_tables.in
--- bacula-5.0.3/src/cats/drop_mysql_tables.in.old 2011-10-06 12:48:04.890972156 +0200
+++ bacula-5.0.3/src/cats/drop_mysql_tables.in 2011-10-06 12:48:52.140381455 +0200
@@ -5,7 +5,7 @@
bindir=@SQL_BINDIR@
db_name=@db_name@
-if $bindir/mysql $* <<END-OF-DATA
+if $bindir/mysql -p $* <<END-OF-DATA
USE ${db_name};
DROP TABLE IF EXISTS Filename;
DROP TABLE IF EXISTS Path;
diff -up bacula-5.0.3/src/cats/grant_mysql_privileges.in.old bacula-5.0.3/src/cats/grant_mysql_privileges.in
--- bacula-5.0.3/src/cats/grant_mysql_privileges.in.old 2011-10-06 12:48:04.893972117 +0200
+++ bacula-5.0.3/src/cats/grant_mysql_privileges.in 2011-10-06 12:48:52.182380930 +0200
@@ -6,7 +6,7 @@ db_user=${db_user:-@db_user@}
bindir=@SQL_BINDIR@
db_name=${db_name:-@db_name@}
-if $bindir/mysql $* -u root -f <<END-OF-DATA
+if $bindir/mysql -p $* -u root -f <<END-OF-DATA
use mysql
grant all privileges on ${db_name}.* to ${db_user}@localhost;
grant all privileges on ${db_name}.* to ${db_user}@"%";
diff -up bacula-5.0.3/src/cats/grant_mysql_privileges.patch.old bacula-5.0.3/src/cats/grant_mysql_privileges.patch
diff -up bacula-5.0.3/src/cats/make_mysql_tables.in.old bacula-5.0.3/src/cats/make_mysql_tables.in
--- bacula-5.0.3/src/cats/make_mysql_tables.in.old 2011-10-06 12:48:04.900972030 +0200
+++ bacula-5.0.3/src/cats/make_mysql_tables.in 2011-10-06 12:48:52.224380404 +0200
@@ -6,7 +6,7 @@ bindir=@SQL_BINDIR@
PATH="$bindir:$PATH"
db_name=${db_name:-@db_name@}
-if mysql $* -f <<END-OF-DATA
+if mysql -p $* -f <<END-OF-DATA
USE ${db_name};
--
-- Note, we use BLOB rather than TEXT because in MySQL,
diff -up bacula-5.0.3/src/cats/update_mysql_tables.in.old bacula-5.0.3/src/cats/update_mysql_tables.in
--- bacula-5.0.3/src/cats/update_mysql_tables.in.old 2011-10-06 12:48:04.904971980 +0200
+++ bacula-5.0.3/src/cats/update_mysql_tables.in 2011-10-06 12:48:52.267379868 +0200
@@ -12,7 +12,7 @@ bindir=@SQL_BINDIR@
PATH="$bindir:$PATH"
db_name=@db_name@
-if mysql $* -f <<END-OF-DATA
+if mysql -p $* -f <<END-OF-DATA
USE ${db_name};
ALTER TABLE JobMedia DROP Stripe ;
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel