Search code examples
pythonmysqlansibleperconarhel7

Ansible mysql_user with Percona 57 and RHEL7


I am trying to use ansible mysql_user module on RHEL7 with Percona 57 though but it fails on

the python mysqldb module is required

I have installed full Percona 57 I`ve also tried to install yum install MySQL-python. (1.2.3) but in Python when i try to import MySQLdb i get

ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory

pip install MySQL-python fails on error (1.2.5)

unable to execute gcc: No such file or directory
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-_9GWXZ/MySQL-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-rmYnmt-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-_9GWXZ/MySQL-python

Anybody other had that problem ?


Solution

  • so finally i've found out it was SELinux blocking ports ><