[solved] Update phpmyadmin and mysql debian 10

Discussion in 'Technical' started by aquick, Dec 17, 2019.

  1. aquick

    aquick New Member

    Hi,

    Is someone kown how to update phpmyadmin following the installation of the perfect server ?
    After apt-get update && upgrade, i had some problems with apache (solved) but phpmyadmin is not up to date.

    thanks for your feedback.
     
  2. ahrasis

    ahrasis Well-Known Member

    phpmyadmin is to be installed manually following that tutorial, so I guess you will have to uninstall the one that come with debian 10 and install the latest version of it manually.
     
  3. Steini86

    Steini86 Active Member

    You have several options with phpmyadmin:
    1) Do all manually
    2) use the docker image (https://docs.phpmyadmin.net/en/latest/setup.html#installing-using-docker)
    3) Use debian package and upgrade manually (will be overwritten if there comes a new debian package). Just delete the folder /usr/share/phpmyadmin and install new files there (adjust config and add blowfish key)
    4) Use www.adminer.org (same functionality, just 1 php file -> easier config/setup)
     
  4. aquick

    aquick New Member

    Thanks for your anwsers, for you what is the best and secure way to do it ?
     
  5. ahrasis

    ahrasis Well-Known Member

    I would only suggest you to follow the tutorial hence removing default debian phpmyadmin is necessary to be done before that.
     
  6. aquick

    aquick New Member

    ok thank for your advice.
     
  7. nhybgtvfr

    nhybgtvfr Active Member

    this will update phpMyAdmin to the current latest stable release 4.9.2

    Code:
    sudo mv /usr/share/phpmyadmin/ /usr/share/phpmyadmin.bak
    sudo mkdir /usr/share/phpmyadmin/
    cd /usr/share/phpmyadmin/
    sudo wget https://files.phpmyadmin.net/phpMyAdmin/4.9.2/phpMyAdmin-4.9.2-all-languages.tar.gz
    sudo tar xzf phpMyAdmin-4.9.2-all-languages.tar.gz
    sudo mv phpMyAdmin-4.9.2-all-languages/* /usr/share/phpmyadmin
    sudo nano /usr/share/phpmyadmin/libraries/vendor_config.php
    search for the lines containing TEMP_DIR and CONFIG_DIR and change them to:
    Code:
    define('TEMP_DIR', '/var/lib/phpmyadmin/tmp/');
    define('CONFIG_DIR', '/etc/phpmyadmin/');
    save the file, then to clean up:
    Code:
    sudo rm /usr/share/phpmyadmin/phpMyAdmin-4.9.2-all-languages.tar.gz
    sudo rm -rf /usr/share/phpmyadmin/phpMyAdmin-4.9.2-all-languages
    then once you've tested phpMyAdmin and are sure everythings ok, you can remove the backup folder:
    Code:
    sudo rm -rf /usr/share/phpmyadmin.bak
     
    Neptun likes this.
  8. aquick

    aquick New Member

    great solution nhybgtvfr thanks a lot
     
  9. nhybgtvfr

    nhybgtvfr Active Member

    just a notice for anyone looking to update phpMyAdmin using the instructions I posted above. 4.9.4 works without problems, if you want to stick to the 4.* releases.
    5.0.1 also works without problems (at least on ubuntu 18.04. using php7.3 or php7.4)

    Known issue: the reported current release version may display incorrectly on the main page (for instance, "Version information: 5.0.1, latest stable version: 4.9.4"). This is expected to be fixed in the next routine bug fix release.
     

Share This Page