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

require pkg: mysql-client breaks in RHEL7/Centos 7 #25

Closed
oznah opened this issue May 25, 2016 · 2 comments
Closed

require pkg: mysql-client breaks in RHEL7/Centos 7 #25

oznah opened this issue May 25, 2016 · 2 comments

Comments

@oznah
Copy link

oznah commented May 25, 2016

You are unable to import schema because the requisite pkg "mysql-client" doesn't exist in RHEL 7/Centos 7.

{% for file in [
  '/usr/share/zabbix-server-mysql/salt-provided-schema.sql',
  '/usr/share/zabbix-server-mysql/salt-provided-images.sql',
  '/usr/share/zabbix-server-mysql/salt-provided-data.sql'
] -%}
{{ file }}:
  file.managed:
    - makedirs: True
    - source: {{ files_switch('zabbix', [ file ]) }}
  cmd.run:
    - name: /usr/bin/mysql -h {{ dbhost }} -u {{ dbuser }} --password={{ dbpass }} {{ dbname }} < {{ file }} && touch {{ file }}.applied
    - unless: test -f {{ file }}.applied
    - require:
      - file: {{ file }}
      - pkg: mysql-client
{% endfor -%}

The mysql client binary is provided by the mariadb package in rhel7/centos 7.

yum whatprovides $(which mysql)
Loaded plugins: product-id, search-disabled-repos, subscription-manager, versionlock
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
1:mariadb-5.5.47-1.el7_2.x86_64 : A community developed branch of MySQL
Repo        : @rhel-x86_64-server-7
Matched from:
Filename    : /bin/mysql
@grandmasterv
Copy link

This fix seemed to work for me.

@hatifnatt
Copy link
Collaborator

This have been resolved in #86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants