<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body text="#000000" bgcolor="#FFFFFF">Have you ensured that 
mariadb is running when you're trying to run these commands?<br>
<br>
This is also something you should be doing with *some* sort of 
configuration management--not a post install script.<br>
<span>

</span><br>
<blockquote style="border: 0px none;" 
cite="mid:CAGBeqiNgF1Ad5--u_tgiVDV9qeKrjsHzVvtqvF1Q4YaKc2HBNQ@mail.gmail.com"
 type="cite">
  <div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div 
style="width:100%;border-top:1px solid #EDEEF0;padding-top:5px">   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:49%;">
        <a moz-do-not-send="true" href="mailto:datakid@gmail.com" 
style="color:#737F92 
!important;padding-right:6px;font-weight:bold;text-decoration:none 
!important;">Lachlan Musicman</a></div>   <div 
style="display:inline-block;white-space:nowrap;vertical-align:middle;width:48%;text-align:
 right;">     <font color="#9FA2A5"><span style="padding-left:6px">Wednesday,
 March 30, 2016 1:55 AM</span></font></div>    </div></div>
  <div style="color:#888888;margin-left:24px;margin-right:24px;" 
__pbrmquotes="true" class="__pbConvBody"><div dir="ltr"><div><div><div><br></div>In
 one particular profile, I'll be installing MariaDB.<br><br></div>I'd 
like to create a db, user, and then secure MariaDB during the 
post-install stage.<br><br></div>My post install script looks like this:<br><br><div>%post
 --log /root/ks-post.log.5<br>#!/bin/bash<br>/usr/bin/mysql -e "create 
database slurmdb; grant all privileges on slurmdb.* to slurm@localhost 
identified by 'slurmdb_password';"<br>/usr/bin/mysql <<-EOF<br>UPDATE
 mysql.user SET Password=PASSWORD('mysqlpassword') WHERE User='root';<br>DELETE
 FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', 
'127.0.0.1', '::1');<br>DELETE FROM mysql.user WHERE User='';<br>DELETE 
FROM mysql.db WHERE Db='test' OR Db='test\_%';<br>FLUSH PRIVILEGES;<br>EOF<br>%end<br><br></div><div>But
 it's not working - neither the database being created or mysql being 
secured.<br><br></div><div>Is my syntax wrong, am I over reaching?<br><br></div><div>L.<br></div><br><div><div><div><div><div><div><div
 dir="ltr"><div><br><br>------<br>The most dangerous phrase in the 
language is, "We've always done it this way."<br><br>- Grace Hopper<br></div></div></div></div>
</div></div></div></div></div>

<div>_______________________________________________<br>Spacewalk-list 
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:Spacewalk-list@redhat.com">Spacewalk-list@redhat.com</a><br><a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/spacewalk-list">https://www.redhat.com/mailman/listinfo/spacewalk-list</a></div></div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div>Sent from <a 
href="https://www.postbox-inc.com/?utm_source=email&utm_medium=siglink&utm_campaign=reach"><span
 style="color: rgb(51, 102, 153);">Postbox</span></a></div></div>
</body></html>