Reinstall Phpmyadmin

Hello Hestia Users and Developers,

My Ubuntu 18.04 to 20.04 distro update process went bad (unexpected server restart), and I lost my Phpmyadmin installation or access somehow. Mydomain/phpmyadmin showed Hestia bad auth error page. Now it’s 404 since I purged phpmyadmin via apt. (I tried reinstall phpmyadmin by hand, but I failed with configuration and MySQL passwords…)

I would like to reinstall Hestia with proper Phpmayadmin installation, since everything else works perfectly. However sudo apt install --reinstall hestia drops error, says can’t download hestia.

Do you have any suggestion how can I restore Phpmyadmin without loosing my user-data?
Thank you for your help!

(I use Hestia since the very first Vesta fork without any problem, Hestia is awsome! This issue is absolutly my fault.)

Hestia v1.2.1, Ubuntu 20.04

apt-get remove phpmyadmin

Download phpmyadmin and copy it to /usr/share/phpmyadmin/

cd ~
wget https://raw.githubusercontent.com/hestiacp/hestiacp/main/install/deb/phpmyadmin/pma.sh
wget https://raw.githubusercontent.com/hestiacp/hestiacp/main/install/deb/phpmyadmin/create_tables.sql
chmod +x pma.sh

Modify line 13 of pma.sh https://github.com/hestiacp/hestiacp/blob/798cf3691aa12eff366b7b17a80e3e7157d3fe63/install/deb/phpmyadmin/pma.sh#L13

PASS=“RANDOMSTRING”

And modify line 146

mysql -u root < ~/phpmyadmin/create_tables.sql

When done login into https://domain.com/phpmyadmin/

Probably you will need to set some rights but can’t remember it :slight_smile:

1 Like

Dear eris,

Thank you for your quick help! Works perfectly now.

hi all,
i have tried those steps, but i received these error message:

./pma.sh: line 17: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 18: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 19: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 20: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 21: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 22: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 23: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 24: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 25: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 26: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 27: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 28: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 29: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 30: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 31: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 32: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 33: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 34: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 35: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 36: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 37: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 38: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 39: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 40: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 41: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 42: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 43: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
./pma.sh: line 44: /etc/phpmyadmin/conf.d/01-localhost.php: No such file or directory
ERROR 1396 (HY000) at line 1: Operation CREATE USER failed for ‘pma’@‘localhost’

what path should i use here to match with debian 10.12 installation?
is there any other option should i change to complete all process?

Run this file in /usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh

2 Likes