Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql.user_exists doesn't work with Mysql 8.0.13 #50542

doug-stratoscale opened this issue Nov 16, 2018 · 3 comments


None yet
3 participants
Copy link

commented Nov 16, 2018

Description of Issue/Question

Using latest fluorine and running mysql.user_exists results in this:
[ERROR ] MySQL Error 2005: Unknown MySQL server host '%' (2)

I believe this issue is as a result of this change:
The user_exists code now calls verify_login to check if the user exists. The problem with this approach is that having "%" as the hostname will no longer work.


Have Mysql 8.0.13 installed. Attempting to execute this:
salt-call mysql.user_exists 'doug' '%' 'aa'

This call works with with Mysql 5.7 and salt v2017.7

Steps to Reproduce Issue

$ salt-call --log-level debug mysql.user_exists 'doug' '%' 'aa'

[DEBUG ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG ] Doing query: SELECT VERSION()
[DEBUG ] Doing query: SELECT column_name from information_schema.COLUMNS WHERE table_schema=%(schema)s and table_name=%(table)s and column_name=%(column)s args: {u'column': u'Password', u'table': u'user', u'schema': u'mysql'}
[ERROR ] MySQL Error 2005: Unknown MySQL server host '%' (2)


Versions Report

Salt Version:
Salt: 2018.11.0-2172-g0327ea0

Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: 1.8.0
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.7.2
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: 0.28.2
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.5.6
mysql-python: 1.3.13
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.5 (default, Jul 13 2018, 13:06:57)
python-gnupg: Not Installed
PyYAML: 3.11
PyZMQ: 15.3.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 4.2.1
ZMQ: 4.1.4

System Versions:
dist: centos 7.5.1804 Core
locale: UTF-8
machine: x86_64
release: 3.10.0-862.14.4.el7.x86_64
system: Linux
version: CentOS Linux 7.5.1804 Core


This comment has been minimized.

Copy link

commented Nov 16, 2018

ping @garethgreenaway can you take a look here


This comment has been minimized.

Copy link

commented Jan 14, 2019

@doug-stratoscale I believe the PR referenced above fixed the issue in question, can you verify that it does resolve the issue you? Thanks!


This comment has been minimized.

Copy link

commented Jan 16, 2019

@garethgreenaway Yes I tested the fix with Mysql 8 based on repro in this issue and it now works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.