Upgrade phpMyAdmin to 5.2.0 in CentOS 7

Let's take a look at how to upgrade to phpMyAdmin to version 5.2.0 in CentOS 7
Upgrade phpMyAdmin to 5.2.0 in CentOS 7

Verify PHP version

Verify PHP version is higher than 7.2 by running below in CentOS

php -v

If version is below 7.2, you'll need to upgrade PHP first

Backup old phpMyAdmin

If you've upgraded before, you might have old backup laying over. Start by removing the old backup

sudo rm -rf /usr/share/phpMyAdmin.bak

Then create a backup of your current directory

sudo mv /usr/share/phpMyAdmin/ /usr/share/phpMyAdmin.bak

Now we create a new phpMyAdmin directory, to replace the one we moved into .bak

sudo mkdir /usr/share/phpMyAdmin/

Download phpMyAdmin

Download phpMyAdmin 5.2.0 from the official site

sudo wget https://files.phpmyadmin.net/phpMyAdmin/5.2.0/phpMyAdmin-5.2.0-all-languages.tar.gz

Extract the content of the file downloaded

sudo tar xzf phpMyAdmin-5.2.0-all-languages.tar.gz

Now move the extracted data into phpMyAdmin folder in /usr/share/

sudo mv phpMyAdmin-5.2.0-all-languages/* /usr/share/phpMyAdmin

Blowfish and TempDir error

After you logon phpMyAdmin, you'll most likely get a Blowfish and TempDir error in the bottom of the page

The configuration file now needs a secret passphrase (blowfish_secret).

The $cfg['TempDir'] (/usr/share/phpMyAdmin/tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.

Blowfish

To fix the Blowfish error, we need to first create a config file

sudo vi /usr/share/phpMyAdmin/config.inc.php

Inside the config file we past below snippet, but first we need to replace 'PASTE__32__CHAR__BLOWFISH_SECRET' with 32 random characters

<?php // use here a value of your choice 32 chars long $cfg['blowfish_secret'] = 'PASTE__32__CHAR__BLOWFISH_SECRET';

$i=0; $i++; $cfg['Servers'][$i]['auth_type'] = 'cookie';

TempDir

If you have TempDir error, issue is that phpMyAdmin don't have a directory to write temp files to. Let's create one and give it some permissions

sudo mkdir /usr/share/phpMyAdmin/tmp && sudo chmod 777 /usr/share/phpMyAdmin/tmp

Cleanup

Now that phpMyAdmin have been upgraded, let's cleanup the files we downloaded

First remove the .tar.gz file

sudo rm phpMyAdmin-5.2.0-all-languages.tar.gz

Then lets remove the extracted folder

sudo rm -rf phpMyAdmin-5.2.0-all-languages

Lastly, if everything worked fine. We can proceed to remove the backup

sudo rm -rf /usr/share/phpMyAdmin.bak

We sometimes publish affiliate links and these always needs to follow our editorial policy, for more information check out our affiliate link policy

You might also like

Waking up during the night to pee could mean you're peeing wrong
Health

Waking up during the night to pee could mean you're peeing wrong

Powder vs Liquid vs Capsul Detergent
Cleaning

Powder vs Liquid vs Capsul Detergent

Arme riddere (Norwegian Cinnamon Toast)
Breakfast

Arme riddere (Norwegian Cinnamon Toast)

Comments

Sign up or Login to post a comment

There are no comments, be the first to comment.