IndexCookbook

Cookbook: Setting up phpMyAdmin

Setting up phpMyAdmin to work with Cherokee is trivial, as Cherokee already provides everything that is needed to work.

According to phpMyAdmin’s documentation, the software requirements are just:

This means that you don’t need to modify Cherokee at all provided you have PHP with MySQL support.

Simply use Cherokee-Admin’s phpMyAdmin Wizard, located under the Database category. It checks for the presence of phpMyAdmin, so you better have the package installed prior to using the Wizard, or else the Wizard will not let you proceed.

Express setup

The only thing you need to do is make phpMyAdmin accessible by Cherokee and all the script files must have permissions suitable for the user running Cherokee.

Most platforms provide packages with all that you need. For Debian based Linux distributions, You can issue the following commands as root (or through sudo) and the whole installation will take a matter of seconds.

Debian installation
# apt-get install php5-cgi php5-mysql mysql-server-5.0 phpmyadmin

Since Cherokee doesn’t appear in the list of web servers provided by the package installation script, select any of them to proceed with phpMyAdmin’s configuration.

The commands above assume you are running Cherokee as root and that your web server’s document root is /var/www.

If you were to run it as www-data, simply change the script’s owner:

Script owner
# chown -R www-data:www-data /usr/share/phpmyadmin

Now point your web browser to http://localhost/phpmyadmin, and use the MySQL user information to access the databases.

media/images/cookbook_phpmyadmin.png
phpMyAdmin in action

Generic setup

If your platform doesn’t provide phpMyAdmin, download it from the main download site and follow the Quick Install notes in the phpMyAdmin documentation. As before, you simply need to make the program accessible to your web server, so simply use the Wizard and fill in the required information. Alternatively you can either install directly under your document root or make a symbolic link.

Configuring with the Wizard

There is also a wizard to assist you with your configuration. Once phpMyAdmin is installed, simply access one of your virtual servers in Cherokee-Admin. Then, access the Behavior tab and trigger the Rule panel by clicking on the Rule Management button. Once in there, use the Add button at the top of the panel to see the available wizards, and choose the phpMyAdmin wizard that can be found under the Web Applications category.

Considerations

media/images/cookbook_phpmyadmin_denied.png
Handler HTTP Error