Installing phpMyAdmin Manually: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 36: | Line 36: | ||
*Initial authentication (and users) can be updated in <code>/home/sympl/phpmyadmin.passwd</code> in normal [[htpasswd]] format. phpMyAdmin has no automatic updating, so ensure you use a '''''strong''''' password. | *Initial authentication (and users) can be updated in <code>/home/sympl/phpmyadmin.passwd</code> in 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. | *The safest way to update phpMyAdmin at present would be to follow these instructions again. | ||
[[Category:How To]] |
Revision as of 18:52, 2 January 2020
This article is Beta Documentation. It may have missing elements, or be unclear in places.
Please feel free to make corrections or amendments, or ask for help on the Sympl Forum
This guide covers installing phpMyAdmin on a server running Sympl 10.x, on Debian Buster. phpMyAdmin is included in Sympl 9.x, as the package is included in Debian Stretch.
This guide is aimed at moderate-to-experienced users, and as such care should be taken when following it.
Installing phpMyAdmin
cd
to your destination htdocs dir, such as a subdirectory of an existing site (example.com/phpmyadmin
), or a separate subdomain (phpmyadmin.example.com
)
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 root
access.
Things to know
- The password for the
sympl
database user can be found in/home/sympl/mysql_password
. - If databases were created with
sympl create database
, their passwords can be found in/home/sympl/mysql_databasename_password
- Initial authentication (and users) can be updated in
/home/sympl/phpmyadmin.passwd
in 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.