geerlingguy.phpmyadmin

Ansible Role: phpMyAdmin

CI

This role installs phpMyAdmin on RHEL, CentOS, Debian, and Ubuntu systems.

phpMyAdmin is a user-friendly web interface for MySQL databases. While it’s not the safest or most efficient way to manage databases, it provides a good graphical user interface (GUI) compared to others. The creator (geerlingguy) doesn't recommend using it on production servers, nor does he personally use it (he prefers tools like Sequel Pro or command-line interaction), but many users find it useful, especially those on Windows without good MySQL GUIs.

Requirements

RedHat/CentOS: You need the EPEL repository for RedHat/CentOS 6.x systems. You can add it using the geerlingguy.repo-epel role.

Debian/Ubuntu: No additional requirements.

Role Variables

phpmyadmin_enablerepo: "epel"

(This is for RedHat/CentOS only) If you have other repositories (like geerlingguy.repo-epel or geerlingguy.repo-remi), you can list them here (e.g. remi,remi-php73). This can be helpful if you want to install the latest PHP 7.3 version along with the newest phpMyAdmin.

phpmyadmin_config_file: /etc/phpmyadmin/config.inc.php

This is the path to the phpMyAdmin configuration file.

Here are the available variables with their default values (check defaults/main.yml):

phpmyadmin_mysql_host: localhost
phpmyadmin_mysql_port: ""
phpmyadmin_mysql_socket: ""
phpmyadmin_mysql_connect_type: tcp

These variables set how phpMyAdmin connects to the MySQL server.

phpmyadmin_mysql_user: root
phpmyadmin_mysql_password: "{{ mysql_root_password }}"

These are the username and password that phpMyAdmin uses to log into MySQL. The mysql_root_password should be defined using the geerlingguy.mysql role. You can and should change this to a different user and password, especially on non-development servers!

Dependencies

  • geerlingguy.apache
  • geerlingguy.mysql
  • geerlingguy.php
  • geerlingguy.php-mysql

Example Playbook

- hosts: utility
  vars_files:
    - vars/main.yml
  roles:
    - { role: geerlingguy.phpmyadmin }

Inside vars/main.yml:

phpmyadmin_mysql_user: special_user
phpmyadmin_mysql_password: secure_password_here

TODO

  • Make the default settings more customizable (not everyone wants phpMyAdmin to automatically log in as root).

License

MIT / BSD

Author Information

This role was created in 2014 by Jeff Geerling, the author of Ansible for DevOps.

Informazioni sul progetto

phpMyAdmin installation for Linux

Installa
ansible-galaxy install geerlingguy.phpmyadmin
Licenza
mit
Download
8.3k
Proprietario
Father, author, developer, maker. Sometimes called "an inflammatory enigma". #stl #drupal #ansible #k8s #raspberrypi #crohns