Installing phpMyAdmin Manually
This guide covers manually installing phpMyAdmin on a server running Sympl Debian Buster, rather than using the packaged version with
sympl-phpmyadmin, which uses the version from Debian Backports.
This guide is aimed at moderate-to-experienced users, and as such care should be taken when following it, and assumes you do not currently have the
phpmyadmin packages installed at present.
cd to your destination htdocs dir, such as a subdirectory of an existing site (
example.com/phpmyadmin), or a separate subdomain (
wget https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz -O - | tar -zxv --strip 1 sympl create database phpmyadmin cat sql/create_tables.sql | mysql -u phpmyadmin -p$( cat /home/sympl/mysql_phpmyadmin_password ) phpmyadmin rm -rf setup/ test/ mkdir tmp ; sudo chown www-data:www-data tmp ; sudo chmod 770 tmp cp config.sample.inc.php config.inc.php echo "\$cfg['blowfish_secret'] = '$( openssl rand -base64 32 | cut -c 1-32 )';" >> config.inc.php echo "\$cfg['UploadDir'] = '$(pwd | cut -d'/' -f 1-4)';" >> config.inc.php echo "\$cfg['SaveDir'] = '$(pwd | cut -d'/' -f 1-4)';" >> config.inc.php echo -e "AuthType Basic\nAuthName \"Restricted Access\"\nAuthUserFile /home/sympl/phpmyadmin.passwd\nRequire valid-user\n" > .htaccess
Now, set the access up:
touch $(pwd | cut -d'/' -f 1-3)/config/ssl-only # enforce ssl-only mode for the site. htpasswd -c /home/sympl/phpmyadmin.passwd phpmyadmin # set a password
You should then be able to browse to the site, log in with the username
phpmyadmin and the password specified, and then log into individual databases or as the
sympl user which has the equivalent of
Things to know
- Any database dumps will be stores in the sites
publicdirectory, and can dumps can be imported from there, also.
- The password for the
sympldatabase user can be found in
- If databases were created with
sympl create database, their passwords can be found in
- Initial authentication (and users) can be updated in
/home/sympl/phpmyadmin.passwdin normal htpasswd format. phpMyAdmin has no automatic updating, so ensure you use a strong password.
- The safest way to update phpMyAdmin at present would be to follow these instructions again.