Ubuntu 20 php and phpmyadmin
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-20-04
sudo apt update
sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl
sudo phpenmod mbstring
sudo systemctl restart apache2
Uninstall completely MySQL
sudo apt-get remove --purge mysql\*
reinstall it
sudo apt install mysql-server mysql-client
test if it run
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'admin1818';
ALTER USER 'technoapology'@'%' IDENTIFIED WITH caching_sha2_password BY 'admin1818';
GRANT ALL PRIVILEGES ON *.* TO 'technoapology'@'localhost' WITH GRANT OPTION;
CREATE USER 'technoapology'@'%'IDENTIFIED BY 'admin1818';
GRANT ALL PRIVILEGES ON *.* TO 'technoapology'@'%' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
Install php drivers
sudo apt install php7.4 php7.4-fpm php7.4-mysql php7.4-cgi php7.4-cli php7.4-common
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
sudo service apache2 restart