Vijayan
Vijayan Thanks for stopping by guys! I'm Vijayan and Techpulse is my beloved brainchild. Currently working as a PHP developer in a digital marketing start-up, I'm overly passionate about not just learning new things but also putting those into practice. I swear by a quote I once came across... 'What separates successful people from unsuccessful people is the former's ability to execute'. Feel free to reach out to me if you have any questions, suggestions or feedback. Hoping to see more of you here!

How to Manually Upgrade phpMyAdmin on Ubuntu


How to Manually Upgrade phpMyAdmin on Ubuntu

phpMyAdmin is a most popular MySQL client to access and manage your database. The phpMyAdmin installation via apt package manager create multiple directories (sudo apt-get install phpmyadmin).

  1. /usr/share/phpmyadmin – Main phpMyAdmin installation
  2. /var/lib/phpmyadmin – Library and tmp directries
  3. /etc/phpmyadmin – Configuration files

Backup phpMyAdmin

We have to take a backup of current phpMyAdmin folder. I have just run the below command to rename phpMyAdmin folder in the same directory.

1
2
CURRENTDATE=`date +%Y_%m_%d_%H_%M_%S`
sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin_bak_${CURRENTDATE}

Download Latest phpMyAdmin

1
wget --no-check-certificate --content-disposition https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.zip -P /tmp

Unzip the file

1
unzip -qq /tmp/phpMyAdmin-*-all-languages.zip -d /tmp

Move phpMyAdmin folder

1
sudo mv /tmp/phpMyAdmin-*-all-languages /usr/share/phpmyadmin

Update the configuration file

Edit vendor_config.php file.

1
sudo vim /usr/share/phpmyadmin/libraries/vendor_config.php

and update the following values.

1
2
define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');
define('CONFIG_DIR', '/etc/phpmyadmin/');

Easiest method to update the configuration file

1
2
sed -i "s+'TEMP_DIR', ROOT_PATH . 'tmp/'+'TEMP_DIR', '/var/lib/phpmyadmin/tmp/'+g" /usr/share/phpmyadmin/libraries/vendor_config.php
sed -i "s+'CONFIG_DIR', ROOT_PATH+'CONFIG_DIR', '/etc/phpmyadmin/'+g" /usr/share/phpmyadmin/libraries/vendor_config.php

You don’t need to install anything. Just execute bash script from a remote site.

1
bash <(curl -Ls https://gist.githubusercontent.com/techpulsetoday/b138b94295d19115d7afffc10abeba8e/raw/)
Rating:

comments powered by Disqus