CyberPanel Community

How to update phpMyAdmin to the latest version in cyberpanel

Ma
Master3395 #1

How to update phpMyAdmin to the latest version in cyberpanel

In this tutorial, you’ll learn how to update your PhpMyAdmin in CyberPanel to the latest version.

NOTICE: Current version compatible with PHP 7.1 and newer and MySQL/MariaDB 5.5 and newer.

1.
log in to your server as the root user
ssh root@YOUR_IP_ADDRESS.

2.
Go to
cd /usr/local/CyberCP/public/

3.
Back up your phpmyadmin folder.
cp -r /usr/local/CyberCP/public/phpmyadmin /usr/local/CyberCP/public/phpmyadmin.old

4.
Remove current phpmyadmin folder
rm -rf phpmyadmin

5.
Install wget
sudo yum install wget

6.
Download the new version from the PHPMyAdmin website, and 5.2.0 is the latest at this moment, so use the wget command.
Go to this website in order to find the link to the latest download later on.

wget https://files.phpmyadmin.net/phpMyAdmin/5.2.0/phpMyAdmin-5.2.0-all-languages.zip

7.
Unzip it
unzip phpMyAdmin-5.2.0-all-languages.zip

8.
Rename the folder so cyberpanel can recognize it
mv phpMyAdmin-5.2.0-all-languages phpmyadmin

9.
Copy config files from phpmyadmin.old into the new folder. (Config and Auto Login using CyberPanel)

cp -r /usr/local/CyberCP/public/phpmyadmin.old/config.inc.php /usr/local/CyberCP/public/phpmyadmin
cp -r /usr/local/CyberCP/public/phpmyadmin.old/phpmyadminsignin.php /usr/local/CyberCP/public/phpmyadmin
cp -r /usr/local/CyberCP/public/phpmyadmin.old/tmp /usr/local/CyberCP/public/phpmyadmin

10.
Remove temp files in the twig folder.

cd /usr/local/CyberCP/public/phpmyadmin/tmp/twig
rm -rf *

(If your PHPMyAdmin says it cannot be accessed, you may give the folder 755 permission as show below)’

11.
Run the command below

chown -R lscpd:lscpd /usr/local/CyberCP/public/phpmyadmin/tmp
chmod -R 755 /usr/local/CyberCP/public/phpmyadmin/tmp/twig

12.
If changing it to 755 does not work you can continue to change folder permissions to 777.

chmod -R 777 /usr/local/CyberCP/public/phpmyadmin/tmp/twig

13.

cd /usr/local/CyberCP/public/phpmyadmin/tmp/twig

14.
Delete the old phpmyadmin folder:
rm -rf /usr/local/CyberCP/public/phpmyadmin.old

15.
Delete the zip folder:
rm -rf /usr/local/CyberCP/public/phpMyAdmin-5.2.0-all-languages.zip

16.
Now access your PHPMyAdmin to check out the link below and change your port if you use another one.
https://:8090/dataBases/phpmyadmin

26 replies
sh
shoaibkk #2

Better to use the official version with cyberpanel. And yes you gave the right things to update

Ma
Master3395 #3

True, just giving a tutorial for people who might benefit from using an up to date PHPMyAdmin before CyberPanel gets the latest version :slight_smile:

Ma
Master3395 #4

@usmannasir Do you think there is a way to integrate the commands I got over or a similar setup when upgrading CyberPanel?

You can even clone the GitHub page Master to the folder and use that?
That way it’s more automated and people won’t complain of outdated phpMyAdmin anymore, they would then just upgrade CyberPanel.

git clone https://github.com/phpmyadmin/phpmyadmin.git

tb
tbaldur #5

Just stole this into mine, very good idea :clap:

tb
tbaldur #6

I was reviewing it to finish the implementation here.
Noticed the 777 permissions.
Here I manually created the folder so the behavior may be different but, you don’t need to change its permissions but rather the owner, as it’s not the root but lscpd whos using the folder:

chown -R lscpd:lscpd /usr/local/CyberCP/public/phpmyadmin/tmp

Ma
Master3395 #7

Default permission for that folder is 755 also, but I figured 777 didn’t change much anyways :slight_smile:
image

Ma
Master3395 #8

I added it to the original post, and changed it a little on part 11 and up.

EJ
Ernest Junuzovic #9

@usmannasir can u make a video tutorial How to update phpMyAdmin to the latest version in cyberpanel

ma
manualsnow #11

Why not simply update phpMyAdmin to latest stable v5.2.1 (released 2023-02-08) in the next build / commit of CyberPanel?

phpMyAdmin v5.2.x came out almost a year ago

SQ
Syams Qomar #12

Hi @Master3395 Please help me. I can’t access my Phpmyadmin after use this step

Please, how to restore?

4.
Remove current phpmyadmin folder
rm -rf phpmyadmin

Capture phpmyadmin

Ma
Master3395 #13

Try this one, and choose 5.2.1.

sh <(curl https://raw.githubusercontent.com/tbaldur/cyberpanel-mods/main/phpmyadmin_v_changer.sh || wget -O - https://raw.githubusercontent.com/tbaldur/cyberpanel-mods/main/phpmyadmin_v_changer.sh)

fl
florevit.com #16

@Syams you need first upgrade cyberpanel to orgin with
sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)

after you reboot then see what happend if all normal can use the link they give

sh <(curl https://raw.githubusercontent.com/tbaldur/cyberpanel-mods/main/phpmyadmin_v_changer.sh || wget -O - https://raw.githubusercontent.com/tbaldur/cyberpanel-mods/main/phpmyadmin_v_changer.sh)

choose 5.2.1

reboot again then update os and looks if works

fl
florevit.com #18

more details need for this theres some missing you removed some more then whas need what linux os you use and version

Ma
Master3395 #23

Try this now and type 5.2.1, since you got 5.1.3 (Default version by CyberPanel atm) @Syams

sh <(curl https://raw.githubusercontent.com/tbaldur/cyberpanel-mods/main/phpmyadmin_v_changer.sh || wget -O - https://raw.githubusercontent.com/tbaldur/cyberpanel-mods/main/phpmyadmin_v_changer.sh)

MA
Malik Aamir Ali #24

https://:8090/dataBases/phpmyadmin
# Not Found

The requested resource was not found on this server.
this isseue facing

Ma
Master3395 #25

Try upgrading or re-install the OS and do a clean install.

Ka
Kamil #26

I tried this but it says "cannot overwrite directory /tmp/confiq.inc.php with non-directory

a1
a159cm #28

it would be great to have such instructions for updating mysql/maridb.

Sign in to reply