Setup PHPMyAdmin on idealstack

Idealstack includes an inbuilt database management GUI, but it's relatively simple and many people may prefer to use the more common PHPMyadmin tool.  It's easy to install phpmyadmin as a site within Idealstack

Setup phpmyadmin via SSH (recomended)

This is usually the fastest way, as it avoids having to upload a lot of files to the server.  It requires an ssh client and familiarity with the linux shell.

  1. Create a site in idealstack and apply the changes to aws.  Make sure you include an SSH key so you can SSH to it in the next step.

  2. SSH to your site: go to the ‘Connect’ tab for the site and paste the ssh command into a terminal, or use the details in a graphical ssh client such as Putty

  3. Copy the PHPMyadmin download link - go to the phpmyadmin site and click download, then copy the link from the popup:

  4. On the ssh session run these commands (replace the link and name of the zip file/directories with the one you copied above)

        cd public_html
        mv phpMyAdmin-4.7.7-all-languages/* public_html
        rm  -r phpMyAdmin-4.7.7-all-languages/

Alternative way : via SFTP

You might prefer this if your not too familiar with the linux console.  Because phpmyadmin includes a large number of files though, be prepared for this to take a while to upload the data:

  1. Download and extract phpmyadmin
  2. Connect to sftp using an sftp client
  3. Upload all the files to the directory '/var/www/html/site/public_html'


Configuring phpMyAdmin

  1. Create a file containing these contents.  Use the hostname you created when setting up the RDS instance (instead of 'database') 
        /* Servers configuration */
        $i = 0;
        /* Server: database [1] */
        $cfg['Servers'][$i]['verbose'] = 'database';
        $cfg['Servers'][$i]['host'] = 'database';
        $cfg['Servers'][$i]['port'] = '';
        $cfg['Servers'][$i]['socket'] = '';
        $cfg['Servers'][$i]['ssl'] = true;
        $cfg['Servers'][$i]['auth_type'] = 'cookie';
        $cfg['Servers'][$i]['user'] = '';
        $cfg['Servers'][$i]['password'] = '';
        /* End of servers configuration */
  2. Optional, but highly recomended - create a .htaccess file that restricts phpmyadmin to only your IP (update to use the correct IP range)
        order deny,allow
        deny from all
        allow from 111.222.333.444/23
  3. Login to phpmyadmin using the username/password from the 'Connect' tab for the site you are interested in.