phpMyAdmin is a tool written in PHP for managing and operating MySQL databases through the web. We are familiar with the lnmp environment, DA, and CP panels that use it to manage MySQL databases. However, friends who have installed DirectAdmin (hereinafter referred to as DA) will find that the default version of phpMyAdmin installed by DA is phpMyAdmin-2.11.11.3-all-languages, and the latest official version is 3.4.10.1. So, how? What about upgrading the phpMyAdmin version? Today, the good VPS gathering will share the process of DA upgrading phpMyAdmin.
phpmyadmin
First, log in to the VPS (or server) with SSH as the root user, and enter the following code according to the steps (this tutorial uses phpMyAdmin-3.4.9 as an example).

wget -O /usr/local/directadmin/scripts/packages/phpMyAdmin-3.4.9-all-languages.tar.gz http://dfn.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin -3.4.9-all-languages.tar.gz
#Download the new version source code
tar xzf /usr/local/directadmin/scripts/packages/phpMyAdmin-3.4.9-all-languages.tar.gz - C /var/www/html
#Extract to the corresponding directory
cp -f /var/www/html/phpMyAdmin-3.4.9-all-languages/config.sample.inc.php /var/www/ html/phpMyAdmin-3.4.9-all-languages/config.inc.php
#Modify the configuration file name
perl -pi -e "s#["auth_type"] = 'cookie'#["auth_type" ] = 'http'#" /var/www/html/phpMyAdmin-3.4.9-all-languages/config.inc.php
perl -pi -e "s#["extension"] = 'mysql'# ["extension"] = 'mysqli'#" /var/www/html/phpMyAdmin-3.4.9-all-languages/config.inc.php
#Write configuration
chown -f -R webapps: webapps /var/www/html/phpMyAdmin-3.4.9-all-languages
chmod -f 755 /var/www/html/phpMyAdmin-3.4.9-all-languages
chmod 000 /var/www/ html/phpMyAdmin-3.4.9-all-languages/scripts
#Modify permissions in the above steps
rm -f /var/www/html/phpMyAdmin
#Delete the original shortcut
ln -s /var/www/html/phpMyAdmin-3.4.9-all-languages ​​/var/www/html/phpMyAdmin
#New shortcut

Well, after the above operations, your phpMyAdmin version has been upgraded to 3.4.9. You can try to access it, and it is generally OK.
What a horse? 403? Can not access? ! OK, good VPS has also encountered this strange problem. After different servers are upgraded through the above process, some are OK directly, while others cannot access phpMyAdmin management and report error 403. Here is the solution, just enter the following command.

chown -R webapps:webapps /var/www/html

Oh, it’s still a permissions issue, ha~ This situation is more common in DAs that use CGI mode. Well, that’s it for the phpMyAdmin upgrade. You are welcome to discuss other problems you may encounter with this powerful panel!

postid
20000

Leave a Reply