2013-08-19 10:03:59 -05:00
|
|
|
mysql:
|
|
|
|
server:
|
2015-05-18 10:49:17 -04:00
|
|
|
# Use this account for database admin (defaults to root)
|
|
|
|
root_user: 'admin'
|
2015-06-24 13:18:30 -04:00
|
|
|
# root_password: '' - to have root@localhost without password
|
2014-05-15 16:40:02 -04:00
|
|
|
root_password: 'somepass'
|
2013-08-19 10:03:59 -05:00
|
|
|
user: mysql
|
2015-04-15 19:06:07 +02:00
|
|
|
# If you only manage the dbs and users and the server is on
|
|
|
|
# another host
|
|
|
|
host: 123.123.123.123
|
2015-10-05 21:44:20 +02:00
|
|
|
# my.cnf sections changes
|
2014-09-29 00:08:11 +09:00
|
|
|
mysqld:
|
2014-12-12 10:05:39 +08:00
|
|
|
# you can use either underscore or hyphen in param names
|
2014-09-29 00:08:11 +09:00
|
|
|
bind-address: 0.0.0.0
|
2014-12-12 10:05:39 +08:00
|
|
|
log_bin: /var/log/mysql/mysql-bin.log
|
2014-09-29 00:08:11 +09:00
|
|
|
port: 3307
|
2014-12-12 10:05:39 +08:00
|
|
|
binlog_do_db: foo
|
2014-09-29 00:08:11 +09:00
|
|
|
auto_increment_increment: 5
|
|
|
|
mysql:
|
|
|
|
# my.cnf param that not require value
|
|
|
|
no-auto-rehash: noarg_present
|
2013-08-16 15:26:39 -06:00
|
|
|
|
2014-05-12 11:47:51 -04:00
|
|
|
# Manage databases
|
|
|
|
database:
|
|
|
|
- foo
|
2014-06-19 22:48:59 +02:00
|
|
|
- bar
|
2014-07-26 23:48:56 -07:00
|
|
|
schema:
|
|
|
|
foo:
|
|
|
|
load: True
|
|
|
|
source: salt://mysql/files/foo.schema
|
|
|
|
bar:
|
|
|
|
load: False
|
2015-03-18 12:45:24 -07:00
|
|
|
baz:
|
|
|
|
load: True
|
|
|
|
source: salt://mysql/files/baz.schema.tmpl
|
|
|
|
template: jinja
|
2014-05-12 11:47:51 -04:00
|
|
|
|
2014-05-12 12:24:16 -04:00
|
|
|
# Manage users
|
2014-12-12 10:05:39 +08:00
|
|
|
# you can get pillar for existent server using scripts/import_users.py script
|
2014-05-12 12:24:16 -04:00
|
|
|
user:
|
2014-11-02 00:24:55 -04:00
|
|
|
frank:
|
2014-05-15 16:40:02 -04:00
|
|
|
password: 'somepass'
|
2014-05-12 12:24:16 -04:00
|
|
|
host: localhost
|
|
|
|
databases:
|
|
|
|
- database: foo
|
|
|
|
grants: ['select', 'insert', 'update']
|
|
|
|
- database: bar
|
|
|
|
grants: ['all privileges']
|
2014-11-02 00:24:55 -04:00
|
|
|
bob:
|
2014-05-15 16:40:02 -04:00
|
|
|
password_hash: '*6C8989366EAF75BB670AD8EA7A7FC1176A95CEF4'
|
2014-05-12 12:24:16 -04:00
|
|
|
host: localhost
|
|
|
|
databases:
|
|
|
|
- database: foo
|
|
|
|
grants: ['all privileges']
|
2014-09-29 00:08:11 +09:00
|
|
|
grant_option: True
|
2014-05-12 12:24:16 -04:00
|
|
|
- database: bar
|
2014-09-29 00:08:11 +09:00
|
|
|
table: foobar
|
2014-05-12 12:24:16 -04:00
|
|
|
grants: ['select', 'insert', 'update', 'delete']
|
2014-11-02 00:24:55 -04:00
|
|
|
nopassuser:
|
2014-08-07 19:24:59 +03:00
|
|
|
password: ~
|
|
|
|
host: localhost
|
|
|
|
databases: []
|
2014-05-12 12:24:16 -04:00
|
|
|
|
2013-09-03 13:34:10 -06:00
|
|
|
# Override any names defined in map.jinja
|
2013-08-16 15:26:39 -06:00
|
|
|
lookup:
|
|
|
|
server: mysql-server
|
|
|
|
client: mysql-client
|
|
|
|
service: mysql-service
|
2013-08-22 16:12:13 -06:00
|
|
|
python: python-mysqldb
|
2014-12-12 09:20:09 +11:00
|
|
|
|
|
|
|
# Install MySQL headers
|
|
|
|
dev:
|
2015-06-02 10:50:38 +08:00
|
|
|
# Install dev package - defaults to False
|
|
|
|
install: False
|
2015-03-10 07:40:19 +11:00
|
|
|
|