I'm new with saltstack, state file that i'm using:
mybd:
mysql_database.present
user22:
mysql_grants.present:
- grant: ALL PRIVILEGES
- database: 'mybd.*'
- user: user22
- host: localhost
- connection_user: root
- connection_host: localhost
- connection_pass: ''
- connection_unix_socket: /tmp/mysql.sock
- connection_charset: utf8
I am getting the following error when applying a mysql state:
ID: mybd
Function: mysql_database.present
Result: True
Comment: Database mybd is already present
Started: 09:05:09.366441
Duration: 5.835 ms
Changes:
ID: user22
Function: mysql_grants.present
Result: False
Comment: Failed to execute: "GRANT ALL PRIVILEGES ON mybd.* TO user22@localhost"
Started: 09:05:09.372849
Duration: 76.012 ms
Changes:
Summary for user
Succeeded: 1 Failed: 1
but when I go to mysql i notice that the privilege is added ! I don't know what I am doing wrong. Is there somebody who knows how to properly grant permissions to a user in mysql through salt-stack?
Salt Version:
Salt Version:
Salt: 2015.8.0
Dependency Versions:
Jinja2: 2.7.2
M2Crypto: 0.31.0
Mako: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
Python: 2.7.5 (default, Nov 16 2020, 22:23:17)
RAET: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
libnacl: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.2
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pygit2: Not Installed
python-gnupg: Not Installed
smmap: Not Installed
timelib: Not Installed
System Versions:
dist: centos 7.9.2009 Core
machine: x86_64
release: 3.10.0-1160.15.2.el7.x86_64
system: CentOS Linux 7.9.2009 Core
mysql version:
mysql Ver 15.1 Distrib 10.3.31-MariaDB, for Linux (x86_64) using readline 5.1