Difference between revisions of "PHPMyAdmin"

From SME Server
Jump to navigationJump to search
 
(41 intermediate revisions by 8 users not shown)
Line 1: Line 1:
== PHPMyAdmin for SME Server ==
+
{{usefulnote}}
 +
==PHPMyAdmin for SME Server==
 
{{Level|Medium}}
 
{{Level|Medium}}
{{Warning box|ONLY run this contribs on SME 8, if you use the current updated version : including smeserver-phpmyadmin-3.5.2.2-1.el5.sme and phpMyAdmin3-3.5.2.2-1.el5 or newer. phpmyadmin 2 will corrupt your data if you intent to use it with SME8 as it uses php 5.3
 
  
---[[User:Unnilennium|Unnilennium]] 13:32, 24 September 2012 (MDT)
+
---[[User:Unnilennium|Unnilennium]]<nowiki> 13:32, 24 September 2012 (MDT)
}}
+
}}</nowiki>
{{#smeversion:phpmyadmin|description}}
+
{{#smeversion:phpMyAdmin|Description}}
{{#smeversion:smeserver-phpmyadmin|description}}
+
{{#smeversion:smeserver-phpmyadmin|Description}}
=== Maintainer ===
 
Darrell May
 
  
=== Description ===
+
===Maintainer===
 +
JP Pialasse (aka Unnilennium)
 +
 
 +
===Description===
 
PHPMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web.  
 
PHPMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web.  
  
Line 17: Line 18:
 
This contrib provides PHPMyAdmin for SME Server.
 
This contrib provides PHPMyAdmin for SME Server.
  
=== Installation ===
+
===Installation===
 +
<tabs container><tab name="For SME10">
 +
yum install --enablerepo=smecontribs smeserver-phpmyadmin
 +
then configure according to your needs
 +
</tab>
 +
<tab name="For SME9">
 +
yum install --enablerepo=smecontribs smeserver-phpmyadmin
 +
then reconfigure
 +
signal-event post-upgrade; signal-event reboot
 +
or if you don't want to restart your server
 +
signal-event phpmyadmin-update
 +
</tab>
 +
<tab name="For SME8">
 
This contrib can be found in the smecontribs repository. To install this contrib you will have to get shell access as root user, and issue the following command:
 
This contrib can be found in the smecontribs repository. To install this contrib you will have to get shell access as root user, and issue the following command:
 
  yum --enablerepo=smecontribs install smeserver-phpmyadmin
 
  yum --enablerepo=smecontribs install smeserver-phpmyadmin
and either
+
 
 +
On sme8 this will also install the dependencies libmcrypt, php53-mcrypt, php53-php-gettext & phpMyAdmin3
 +
 
 +
then do either
 
  signal-event post-upgrade; signal-event reboot
 
  signal-event post-upgrade; signal-event reboot
 
or
 
or
Line 26: Line 42:
 
  expand-template /etc/httpd/conf/httpd.conf
 
  expand-template /etc/httpd/conf/httpd.conf
 
  service httpd-e-smith restart
 
  service httpd-e-smith restart
 +
</tab>
 +
</tabs>
  
{{note box|msg=The contrib is not yet in smecontribs [[bugzilla:7627]], so you have to download it by smetest}}
+
===Configuration===
 
 
yum install smeserver-phpmyadmin --enablerepo=smetest,smecontribs
 
and then
 
expand-template /etc/phpMyAdmin/config.inc.php
 
expand-template /etc/httpd/conf/httpd.conf
 
service httpd-e-smith restart
 
 
 
{{note box| if you need to install php-mcrypt this is the workaround}}
 
yum --enablerepo=smecontribs install php-mcrypt
 
signal-event post-upgrade; signal-event reboot
 
 
 
=== Uninstall ===
 
rpm -e smeserver-phpmyadmin phpmyadmin
 
 
 
=== Configuration ===
 
 
By default, access to phpmyadmin is restricted to the local network, and to any trusted networks. To make phpmyadmin accessible to external networks (the internet), the configuration parameter for access has to be changed. Changing this parameter requires you to use the SME Server shell.
 
By default, access to phpmyadmin is restricted to the local network, and to any trusted networks. To make phpmyadmin accessible to external networks (the internet), the configuration parameter for access has to be changed. Changing this parameter requires you to use the SME Server shell.
  
Line 56: Line 59:
  
 
To change the current setting:
 
To change the current setting:
*private or public access
+
====private or public access====
 
  config setprop phpmyadmin access (private|public)
 
  config setprop phpmyadmin access (private|public)
 
  signal-event ibay-modify
 
  signal-event ibay-modify
 
{{Warning box|Setting the access type to public makes PHPMyAdmin available to the internet, make sure you choose a strong password before doing so as you severely weaken the security of your server.}}
 
{{Warning box|Setting the access type to public makes PHPMyAdmin available to the internet, make sure you choose a strong password before doing so as you severely weaken the security of your server.}}
  
*adminaccess
+
====admin access only (default)====
 
set to enabled (enabled|disabled) to use with the url https://your-sme-ip/phpmyadmin with the SME admin account and its password.
 
set to enabled (enabled|disabled) to use with the url https://your-sme-ip/phpmyadmin with the SME admin account and its password.
 
  config setprop phpmyadmin adminaccess enabled
 
  config setprop phpmyadmin adminaccess enabled
Line 69: Line 72:
 
  service httpd-e-smith restart
 
  service httpd-e-smith restart
  
*multiaccess
+
====multiuser access====
set to enabled (enabled|disabled) to use with the url https://your-sme-ip/phpmyadmin-multi with the '''Mysql user account of a database''' and its password.
+
set to enabled (enabled|disabled) to use with the url https://your-sme-ip/phpmyadmin-multi with the '''Mysql user account of a database''' and its password. '''Only the database concerned is seen in the phpmyadmin management web page.'''
 +
{{note box|alternatively you can use root and ldap password (cat /etc/ldap.secret), but it is not advisable}}
 
  config setprop phpmyadmin multiaccess enabled
 
  config setprop phpmyadmin multiaccess enabled
 
and do these commands
 
and do these commands
Line 77: Line 81:
 
  service httpd-e-smith restart
 
  service httpd-e-smith restart
  
*prevent the adminaccess
+
====prevent the admin access====
in certain cases you may want to forbid the admin access for security reasons and you have to set the adminaccess to disabled and the multiaccess to enabled
+
in certain cases you may want to forbid the adminaccess and allow only the multiaccess, so you have to set the adminaccess to disabled and the multiaccess to enabled
  
 
  config setprop phpmyadmin adminaccess disabled
 
  config setprop phpmyadmin adminaccess disabled
Line 87: Line 91:
 
  service httpd-e-smith restart
 
  service httpd-e-smith restart
  
=== Additional information ===
+
therefore the access for multi user will be available through the url https://your-sme-ip/phpmyadmin (instead of phpmyadmin-multi)
* Access with admin username/password via: https://yourdomain/phpmyadmin
+
 
 +
{{Tip box| remember that at any time you can see you db configuration by the command "config show phpmyadmin in a root Terminal}}
 +
====specific SME Server 9 and newer settings====
 +
 
 +
Starting SME9 you have some more settings available by DB
 +
 
 +
# config show phpmyadmin
 +
phpmyadmin=configuration
 +
    DbName=phpmyadmin
 +
    DbPassword=rvAd9ShvG2GyiWPXiH+oAK3/yk4GwCxDW5PWzy2CWdtMG7zu3SSH7XkJUEV7EpY8HSVaCCHKL//2
 +
    DbUser=phpmyadmin
 +
    access=private
 +
    adminaccess=enabled
 +
    multiaccess=disabled
 +
    sqladminPassword=mcJ1Tad4I0XENJrl+sfzkKjS8rs4Bq6C0MsjbTkgyv3evFLrPgrXy8eP1u23vANuGtSkQ3//8tmM
 +
    status=enabled
 +
 
 +
*status
  
* The password is changed using the privileges section of phpmyadmin. (Locate the admin user and assign a new password there).
+
You can enable/disable phpmyadmin (enabled|disabled)
 +
config setprop phpmyadmin status disabled
 +
signal-event phpmyadmin-update
 +
 
 +
*sqladmin
 +
 
 +
You have a super sql user when you use the cookies authentication mode (phpmyadmin-multi or multiaccess enabled)<br />
 +
login    : sqladmin<br />
 +
password : content of the db '''sqladminPassword'''<br />
 +
 
 +
*Blowfish secret
 +
 
 +
Starting SME10, you also have a secret generated,for blowfish, but you can change it if you want.
 +
BlowfishSecret=ssdfgsdg/sdfgsdffgsdrtert546y654bttbt
 +
 
 +
===Additional information===
 +
 
 +
*'''NEVER''' MODIFY MYSQL ROOT user PASSWORD
 +
 
 +
*Adminaccess with admin username/password via: https://yourdomain/phpmyadmin
 +
 
 +
*multiaccess with the '''Mysql user account of a database''' and its password via: https://your-sme-ip/phpmyadmin-multi (or https://yourdomain/phpmyadmin if admin access disabled)
 +
 
 +
*The password is changed using the privileges section of phpmyadmin. (Locate the admin user and assign a new password there).
 +
 
 +
*Did we mention : '''NEVER''' MODIFY MYSQL ROOT user PASSWORD
 +
 
 +
*If you see this error '''#1146 - Table 'phpmyadmin.pma_table_uiprefs' doesn't exist''' when viewing data see a solution here: http://forums.contribs.org/index.php/topic,51696.0.html
  
 
More information about PhpMyAdmin can be found on the [http://www.phpmyadmin.net PHPMyAdmin] site.
 
More information about PhpMyAdmin can be found on the [http://www.phpmyadmin.net PHPMyAdmin] site.
  
=== Bugs ===
+
===Uninstall===
 +
yum remove phpMyAdmin
 +
signal-event post-upgrade; signal-event reboot
 +
 
 +
===Bugs===
 
Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title=bugzilla}}and select the smeserver-phpmyadmin component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-phpmyadmin|title=this link}}.
 
Please raise bugs under the SME-Contribs section in {{BugzillaFileBug|product=|component=|title=bugzilla}}and select the smeserver-phpmyadmin component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-phpmyadmin|title=this link}}.
 +
{{#bugzilla:columns=id,product,version,status,summary |sort=id |order=desc |component=smeserver-phpmyadmin |noresultsmessage="No open bugs found."}}
 +
 +
===Changelog===
 +
Only released version in smecontrib are listed here.
 +
 +
{{#smechangelog: smeserver-phpmyadmin}}
 +
 
----
 
----
 
[[Category: Contrib]]
 
[[Category: Contrib]]
 
[[Category: Administration]]
 
[[Category: Administration]]

Latest revision as of 22:19, 28 March 2021

Is this article helpful to you?
Please consider donating or volunteering
Thank you!

PHPMyAdmin for SME Server

PythonIcon.png Skill level: Medium
The instructions on this page require a basic knowledge of linux.


---Unnilennium 13:32, 24 September 2012 (MDT) }}

Contrib 10:
Contrib 9:
phpMyAdmin
Description


Contrib 10:
Contrib 9:
smeserver-phpmyadmin
Description


Maintainer

JP Pialasse (aka Unnilennium)

Description

PHPMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web.

Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields, manage privileges,export data into various formats.

This contrib provides PHPMyAdmin for SME Server.

Installation

yum install --enablerepo=smecontribs smeserver-phpmyadmin

then configure according to your needs

yum install --enablerepo=smecontribs smeserver-phpmyadmin

then reconfigure

signal-event post-upgrade; signal-event reboot

or if you don't want to restart your server

signal-event phpmyadmin-update

This contrib can be found in the smecontribs repository. To install this contrib you will have to get shell access as root user, and issue the following command:

yum --enablerepo=smecontribs install smeserver-phpmyadmin

On sme8 this will also install the dependencies libmcrypt, php53-mcrypt, php53-php-gettext & phpMyAdmin3

then do either

signal-event post-upgrade; signal-event reboot

or

expand-template /etc/phpMyAdmin/config.inc.php
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart

Configuration

By default, access to phpmyadmin is restricted to the local network, and to any trusted networks. To make phpmyadmin accessible to external networks (the internet), the configuration parameter for access has to be changed. Changing this parameter requires you to use the SME Server shell.

To view the current access setting:

config show phpmyadmin

This would output something like this:

phpmyadmin=configuration
 access=private
 adminaccess=enabled
 multiaccess=disabled

To change the current setting:

private or public access

config setprop phpmyadmin access (private|public)
signal-event ibay-modify
Warning.png Warning:
Setting the access type to public makes PHPMyAdmin available to the internet, make sure you choose a strong password before doing so as you severely weaken the security of your server.


admin access only (default)

set to enabled (enabled|disabled) to use with the url https://your-sme-ip/phpmyadmin with the SME admin account and its password.

config setprop phpmyadmin adminaccess enabled

and do these commands

expand-template /etc/phpMyAdmin/config.inc.php
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart

multiuser access

set to enabled (enabled|disabled) to use with the url https://your-sme-ip/phpmyadmin-multi with the Mysql user account of a database and its password. Only the database concerned is seen in the phpmyadmin management web page.

Important.png Note:
alternatively you can use root and ldap password (cat /etc/ldap.secret), but it is not advisable


config setprop phpmyadmin multiaccess enabled

and do these commands

expand-template /etc/phpMyAdmin/config.inc.php
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart

prevent the admin access

in certain cases you may want to forbid the adminaccess and allow only the multiaccess, so you have to set the adminaccess to disabled and the multiaccess to enabled

config setprop phpmyadmin adminaccess disabled
config setprop phpmyadmin multiaccess enabled

and do these commands

expand-template /etc/phpMyAdmin/config.inc.php
expand-template /etc/httpd/conf/httpd.conf
service httpd-e-smith restart

therefore the access for multi user will be available through the url https://your-sme-ip/phpmyadmin (instead of phpmyadmin-multi)


Information.png Tip:
remember that at any time you can see you db configuration by the command "config show phpmyadmin in a root Terminal


specific SME Server 9 and newer settings

Starting SME9 you have some more settings available by DB

# config show phpmyadmin
phpmyadmin=configuration
   DbName=phpmyadmin
   DbPassword=rvAd9ShvG2GyiWPXiH+oAK3/yk4GwCxDW5PWzy2CWdtMG7zu3SSH7XkJUEV7EpY8HSVaCCHKL//2
   DbUser=phpmyadmin
   access=private
   adminaccess=enabled
   multiaccess=disabled
   sqladminPassword=mcJ1Tad4I0XENJrl+sfzkKjS8rs4Bq6C0MsjbTkgyv3evFLrPgrXy8eP1u23vANuGtSkQ3//8tmM
   status=enabled
  • status

You can enable/disable phpmyadmin (enabled|disabled)

config setprop phpmyadmin status disabled
signal-event phpmyadmin-update
  • sqladmin

You have a super sql user when you use the cookies authentication mode (phpmyadmin-multi or multiaccess enabled)
login : sqladmin
password : content of the db sqladminPassword

  • Blowfish secret

Starting SME10, you also have a secret generated,for blowfish, but you can change it if you want.

BlowfishSecret=ssdfgsdg/sdfgsdffgsdrtert546y654bttbt

Additional information

  • NEVER MODIFY MYSQL ROOT user PASSWORD
  • The password is changed using the privileges section of phpmyadmin. (Locate the admin user and assign a new password there).
  • Did we mention : NEVER MODIFY MYSQL ROOT user PASSWORD

More information about PhpMyAdmin can be found on the PHPMyAdmin site.

Uninstall

yum remove phpMyAdmin
signal-event post-upgrade; signal-event reboot

Bugs

Please raise bugs under the SME-Contribs section in bugzilla and select the smeserver-phpmyadmin component or use this link .

IDProductVersionStatusSummary (3 tasks)
12736SME Contribs11.0RESOLVEDfirst build for sme11
12516SME Contribs10.0CONFIRMEDWrong Servers output from template
12343SME Contribs10.0RESOLVEDauthorization in Location section make Directory section authorization ignored

Changelog

Only released version in smecontrib are listed here.

smeserver-phpmyadmin Changelog: SME 10 (smecontribs)
2023/10/25 Jean-Philippe Pialasse 4.0.10.2-14.sme
- fix private access not respected for admin [SME: 12343]
2022/07/31 Jean-Philippe Pialasse 4.0.10.2-13.sme
- update to httpd 2.4 access syntax [SME: 12056]

2022/07/23 Jean-Philippe Pialasse 4.0.10.2-12.sme
- use $httpPort in place of hardcoded port 80 [SME: 11408]

- update to httpd 2.4 access syntax [SME: 12056]

2021/02/28 Jean-Philipe Pialasse 4.0.10.2-11.sme
- finish php74 pool integration [SME: 11043]

fixed dir perms
2020/12/18 John Crisp 4.0.10.2-8.sme
- add php pool template and remove disable unit.ini