Hi,
I tried to install Bareos with the MySQL Community version 8 on Oracle Linux. I 
could create the database and tables using the following commands as per the 
manual

/usr/lib/bareos/scripts/create_bareos_database 
/usr/lib/bareos/scripts/make_bareos_tables

but when granting the privileges using the 
/usr/lib/bareos/scripts/grant_bareos_privileges command, it gave the following 
errors with the rather misleading final statement: 


ERROR 1819 (HY000) at line 5: Your password does not satisfy the current policy 
requirements
ERROR 1819 (HY000) at line 6: Your password does not satisfy the current policy 
requirements
ERROR 1819 (HY000) at line 7: Your password does not satisfy the current policy 
requirements
ERROR 1064 (42000) at line 9: You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right syntax to 
use near 'IDENTIFIED BY 'insert_db_password_here'' at line 1
ERROR 1064 (42000) at line 10: You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right syntax to 
use near 'IDENTIFIED BY 'insert_db_password_here'' at line 1
ERROR 1064 (42000) at line 11: You have an error in your SQL syntax; check the 
manual that corresponds to your MySQL server version for the right syntax to 
use near 'IDENTIFIED BY 'insert_db_password_here'' at line 1
Privileges for user bareos granted ON database bareos.

The problem lies in the grant privileges 'template' for MySQL at 
/usr/lib/bareos/scripts/ddl/grants/mysql.sql . With a friend who is a DB 
expert, he corrected it to the following:

USE mysql

-- mysql >= 5.7 / mariadb >= 10.1  do not autocreate
-- users on GRANT like it was before.
CREATE USER '@DB_USER@'@'localhost' @DB_PASS@;
CREATE USER '@DB_USER@'@'127.0.0.1'  @DB_PASS@;
CREATE USER '@DB_USER@'@'::1' @DB_PASS@;

GRANT ALL PRIVILEGES ON @DB_NAME@.* TO '@DB_USER@'@'localhost' ;
GRANT ALL PRIVILEGES ON @DB_NAME@.* TO '@DB_USER@'@'127.0.0.1' ;
GRANT ALL PRIVILEGES ON @DB_NAME@.* TO '@DB_USER@'@'::1' ;
FLUSH PRIVILEGES;

Basically, the @DB_PASS@ phrase is moved from the GRANT lines to the CREATE 
lines. Also the phrase TABLES on the GRANT lines were not required, too.

Running the same command with the updated template generated no new erros

Hope this helps

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to