[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 HowtoForge Supporter

    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 HowtoForge Supporter

    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 Well-Known Member HowtoForge Supporter

    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/');
    ***** some settings have changed now for versions 5.0.1 and above.... and blowfish_secret needs to be configured as well.. use the settings below for v5.*:

    edit /usr/share/phpmyadmin/libraries/vendor_config.php
    Code:
    'tempDir' => '/tmp/'
    'configFile' => '/etc/phpmyadmin/config.inc.php',


    also, i already had in /etc/phpmyadmin/config.inc.php:
    Code:
    // Load secret generated on postinst
    if (check_file_access('/var/lib/phpmyadmin/blowfish_secret.inc.php')) {
    require('/var/lib/phpmyadmin/blowfish_secret.inc.php');
    }

    and /var/lib/phpmyadmin/blowfish_secret_inc.php already contained:
    Code:
    <?php
    $cfg['blowfish_secret'] = '<redacted>';

    the blowfish config may have been added during an earlier manual update to 5.0.1.. i know i never had to change anything for that to go up to 5.2.0

    ***** end of edit for v5.* config..


    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
     
    Last edited: Jan 4, 2023
    Neptun likes this.
  8. aquick

    aquick New Member

    great solution nhybgtvfr thanks a lot
     
  9. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    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.
     
  10. Walterpet

    Walterpet Member

    I have update to 4.9.4
    and now it works well.
    thank you very much indeed
     
  11. elmacus

    elmacus Active Member

    Taleman likes this.
  12. Walterpet

    Walterpet Member

    how do I install version 4.9.5?

    [QUOTE = "elmacus, post: 405595, membro: 82380"] Per tua informazione, phpMyAdmin è ora in backport. Non è necessario scaricare e installare manualmente.
    https://packages.debian.org/buster-backports/phpmyadmin
    4.9.4 non è sicuro, è necessario almeno 4.9.5. [/ PREVENTIVO]
     
  13. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  14. Walterpet

    Walterpet Member

    Thanks, but with your guidance I don't feel confident about doing a safe job
     

Share This Page