1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Clean roles/phpmyadmin/README.md for PR #2990

This commit is contained in:
A Holt 2021-10-21 12:18:44 -04:00 committed by GitHub
parent 6773f9b18f
commit 790f88c078
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,25 +1,25 @@
## Authentication for Phpmyadmin via MySQL
## 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 achieed via ssh and the commandline tool "mysql". But for most users, who do not use the text based commandline interface regularly, phpmyadmin is much easier to learn and remember.
[phpMyAdmin](https://www.phpmyadmin.net/) 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 it's 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.
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)
1. Phpmyadmin, because it is a browser based HTML php applications, 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](http://wiki.laptop.org/go/IIAB/FAQ#What_is_local_vars.yml_and_how_do_I_customize_it.3F)
2. Then install IIAB. Or if IIAB is already installed, run:
```
cd /opt/iiab/iiab
sudo ./runrole phpmyadmin
```
#### 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 run
```
cd /opt/iiab/iiab
./runrole phpmyadmin
```
#### Testing Phpmyadmin
1. It is possible to quickly test your phpmyadmin installation.
3. There is a small table already created in your MySQL databaase by the Admin Console called iiab_feedbck.
4. A small script creates a user "Admin" with a password "changeme" that has acccess only to this table which can be run:
```
sudo mysql < /opt/iiab/iiab/roles/phpmyadmin/templates/mkuser
```
5. Test by browsig to http://box.lan/phpyadmin and entering the credentials username: Admin password: changeme
#### Testing phpMyAdmin
1. It is possible to quickly test your phpMyAdmin installation.
3. There is a small table already created in your MySQL databaase by the Admin Console called `iiab_feedback`
4. 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
```
5. Finally, test that it's working by browsing to http://box.lan/phpyadmin with username `Admin` and password `changeme`