Updating phpmyadmin (Ubuntu).[How?]

phpmyadmin is mysql client, so it will not affect your database if you uninstall phpmyadmin. I update phpmyadmin by using terminal commands:
First you have to add repository to get phpmyadmin :

sudo add-apt-repository ppa:nijel/phpmyadmin;

and then update it to get the latest version of software in repositories :

sudo apt-get update;

after that, you can get it (install, you need to uninstall the older version first if you have) :

sudo apt-get install phpmyadmin;

Oh, make sure you are connected to the internet
Using ubuntu? i think it will be better if you ask it in ubuntu forum.
may it helps
------ UPDATE -------
If you find the phpmyadmin version you get from ppa is not the latest one, you can find the latest version here and install it manually (not from repo).
Downloaded phpmyadmin can be installed in /var/www/html/ or in your working directory (public_html or something you've defined). Just extract the zip and move extracted folder to /var/www/html/. And don't forget to change the permission of the phpmyadmin folder to 777(it may not safe, but works fine).

Here is the how: extract downloaded file

unzip phpMyAdmin-4.6.6-all-languages.zip

move to /var/www/html/, you might need sudo.
if you're not sudoer, move it into your working directory (e.g. public_html), and rename the folder to 'phpmyadmin'

sudo mv phpMyAdmin-4.6.6-all-languages /var/www/html/phpmyadmin

change the permission

sudo chmod 777 -R /var/www/html/phpmyadmin

and then you can access phpmyadmin via http://localhost/phpmyadmin.

If you put the phpmyadmin in public_html, you might want to create a symlink into it from /var/www/html, so you can access phpmyadmin as usual.


Here is how to upgrade/downgrade on Ubuntu.

Note : The following instruction only works if you previously correctly installed phpmyadmin with the command line and use APACHE as a web server

I suppose that you already have a working phpmyadmin, but the version isn't the one you want. For instance Ubuntu is shipping the 4.6.x version witch does'nt work properly with php7.2.

1 - check the version you want on :

https://www.phpmyadmin.net/files/

2 - on your server

cd /usr/share/
rm -rf phpmyadmin

then adapt this line with correct version number

wget https://files.phpmyadmin.net/phpMyAdmin/4.8.0/phpMyAdmin-4.8.0-all-languages.zip
unzip phpMyAdmin-4.8.0-all-languages.zip
rm phpMyAdmin-4.8.0-all-languages.zip
mv phpMyAdmin-4.8.0-all-languages phpmyadmin

Note : If unzip don't work, install it with : sudo apt-get install unzip

3 - Check permissions

Now you should be good.

The owner of /usr/share/phpmyadmin should be root:root on a default installation. This should be fine but if you face some permissions issues, you can try to let Apache be the owner.

# only if you have permissions issues
chown -R www-data:www-data /usr/share/phpmyadmin
chmod -R 755 /usr/share/phpmyadmin

Also you can restart Apache

sudo service apache2 reload

4 - Troubleshooting

Note : according to your PHP version you might need to install extra librairies.

Ex : error about missing mysqli and mysql extensions (adapt php version number)

sudo apt-get install php5.6-mysql


phpMyAdmin is only client for MySQL database, it doesn't contain your data. It's all saved in database, so nothing will be deleted even if you delete phpMyAdmin.

To update phpMyAdmin from repository you can follow steps from this thread.