vagrant ssh provisioning - mysql password
I'm building a Vagrant box (CentOS 6.4) using SSH provisioning.
All's running fine, LAMP components installed and started but I've reached
the step where I should secure MySql (set mysql password, etc).
There's mysql_secure_installation that could be run, but it doesn't work
in a non-interactive mode.
I could run
/usr/bin/mysqladmin -u root password 'newpassword'
but if I provision the same box multiple times, Mysql will accept a new
password the first time, but then will complain.
Is there an elegant way of securing MySql, automatically, at provisioning
time? (I'm not using Chef/Puppet, just simple SSH provisioning)
No comments:
Post a Comment