tripleo-image-elements/elements/mysql-common
Therese McHale ae805fdf30 Create ~/.my.cnf with root user/password
50-mysql-users and 60-mysql-secure depend on ~/.my.cnf
existing with the correct root password.
This needs to be created as part of the install so that
os-refresh-config will work post install.
On a re-image this may not exist so try with no password
or with /mnt/state/root/metadata.my.cnf
Change-Id: If984c45b5745997a2ec63d9c90d4cf4c105964d2
2014-04-30 12:35:22 +01:00
..
install.d mysql-common requires python MySQLdb 2014-04-22 11:27:33 +00:00
os-config-applier/mnt/state Create ~/.my.cnf with root user/password 2014-04-30 12:35:22 +01:00
os-refresh-config Create ~/.my.cnf with root user/password 2014-04-30 12:35:22 +01:00
README.md Adds mysql-common element 2014-03-26 21:22:30 +01:00
element-deps Adds mysql-common element 2014-03-26 21:22:30 +01:00

README.md

This element contains code common for mysql and mariadb elements, make sure you include once of them when including this element.

TODO: auto-tune settings based on host resources or metadata service.

Configuration

Users will be created if Heat Metadata is passed in under the 'mysql.create-users' section. For example:

mysql:
  create-users:
    - username: dbuser1
      database: somedb
      userhandle:
        Ref: SomeWaitConditionHandle

This will cause mysql to create the user 'dbuser1' if it does not exist, and grant it all privileges on somedb. It will have a random password generated and passed to the WaitConditionHandle with the key of the username, and password as the data. A password can also be given for the user like this:

mysql:
  create-users:
    - username: dbuser2
      database: somedb
      password: abcdefg12345

If a userhandle is also given with the password, it will be passed to the wait condition handle in the same manner.