GithubHelp home page GithubHelp logo

Comments (3)

SkypLabs avatar SkypLabs commented on July 18, 2024 1

As explained in the official Salt documentation, the mysql_database.present function depends on the MySQLdb Python module. When absent from your system, Salt returns this cryptic message stating that the reason of State 'mysql_user.present' was not found in SLS 'roles.vlab.database' is because 'mysql_user' __virtual__ returned False. An issue has been submitted to the Salt project to improve this error message.

Furthermore, installing the MySQLdb Python module with your distribution's package manager won't solve the problem if you are using the onedir version of Salt. You will need to install it with the salt-pip tool (more on this here).

from mysql-formula.

damienvancouver avatar damienvancouver commented on July 18, 2024 1

If you are using oneDir salt and Debian/Ubuntu, the following commands run on your minion should fix the issue:

apt install build-essential pkg-config libmariadb-dev  
salt-pip install mysqlclient

Or, you can do this in your state files and state.apply on your minions to install mysqlclient package:

salt_mysql_dependencies:
  pkg.installed:
    - pkgs:
      - build-essential
      - libmariadb-dev
      - pkg-config
 
mysqlclient:
  pip.installed  

After either method, salt-pip list should show you "mysqlclient" in the output. If so, restart salt-minion and your mysql_* modules should be working.

from mysql-formula.

dimduj avatar dimduj commented on July 18, 2024

I've upgrade from Salt2017 to 2019 and the issue has been solved.

from mysql-formula.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.