1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00
iiab/roles/phpmyadmin
2022-07-01 17:51:04 -04:00
..
defaults phpMyAdmin 5.2.0 2022-05-11 13:01:40 -04:00
tasks phpmyadmin: Remove stale comment, cleaner spacing 2022-07-01 17:51:04 -04:00
templates change to socet 2021-10-06 18:10:07 +01:00
README.md Clean roles/phpmyadmin/README.md for PR #2990 2021-10-21 12:18:44 -04:00

Authentication for phpMyAdmin via MySQL

Overview

phpMyAdmin is a PHP interface to MySQL tables. It permits a browser client to inspect and modify a MySQL database across a network. It permits a Graphical User interface to achieve almost the same level of control as can be achieved via ssh and the command-line tool "mysql". But for most users, who do not use the (text-based) command-line interface regularly, phpMyAdmin is much easier to learn and remember.

Access to MySQL tables all descends from "root".

  1. When MySQL is installed, it is prepared to create its own set of users and passwords that is distinct from the usernames and passwords that is maintained by the operating system. Initially the only user permitted to add or change users is a user named "root" who is already signed on (and therefore knows the Linux root password). The normal path for person setting up a MySQL database is to use the "mysql" command line tool to create new users and assign passwords.
  2. phpMyAdmin, because it is a browser-based HTML PHP application, is limited in what it can do, and what it can access — until the "root" user creates users and access privileges, as mentioned above. (HTML servers always run with very low privileges)

Installing phpMyAdmin

  1. First, a user will need to set phpmyadmin_install: True and phpmyadmin_enabled: True in /etc/iiab/local_vars.yml
  2. Then install IIAB. Or if IIAB is already installed, run:
    cd /opt/iiab/iiab
    sudo ./runrole phpmyadmin
    

Testing phpMyAdmin

  1. It is possible to quickly test your phpMyAdmin installation.
  2. There is a small table already created in your MySQL databaase by the Admin Console called iiab_feedback
  3. A small script can be run, that creates user "Admin" with password "changeme" and has access to this table only:
    sudo mysql < /opt/iiab/iiab/roles/phpmyadmin/templates/mkuser
    
  4. Finally, test that it's working by browsing to http://box.lan/phpyadmin with username Admin and password changeme