In one particular profile, I'll be installing MariaDB.
I'd like to create a db, user, and then secure MariaDB during the
post-install stage.
My post install script looks like this:
%post --log /root/ks-post.log.5
#!/bin/bash
/usr/bin/mysql -e "create database slurmdb; grant all privileges on
slurmdb.* to slurm@localhost identified by 'slurmdb_password';"
/usr/bin/mysql <<-EOF
UPDATE mysql.user SET Password=PASSWORD('mysqlpassword') WHERE User='root';
DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost',
'127.0.0.1', '::1');
DELETE FROM mysql.user WHERE User='';
DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%';
FLUSH PRIVILEGES;
EOF
%end
But it's not working - neither the database being created or mysql
being secured.
Is my syntax wrong, am I over reaching?
L.
------
The most dangerous phrase in the language is, "We've always done it this
way."
- Grace Hopper
_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list