Casa > H > How To Reinstall Phpmyadmin On Ubuntu 16.04

How to reinstall phpMyAdmin on Ubuntu 16.04

  1. sudo apt install wget -y
  2. wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz.

(the -P option instructs wget to save the files directly in the Downloads directory. Feel free to specify any directory you see fit)

  1. To verify the GPG key for phpMyAdmin, download the phpMyAdmin keyring to the Downloads directory:

wget -P Downloads https://files.phpmyadmin.net/phpmyadmin.keyring

  1. Access the Downloads directory and import the keyring:
  1. cd Downloads 
  2. gpg --import phpmyadmin.keyring 
  1. Download the corresponding GPG .asc file for your version of phpMyAdmin:

wget -P Downloads https://www.phpmyadmin.net/downloads/phpMyAdmin-latest-all-languages.tar.gz.asc

  1. Access the Downloads directory and verify the .asc file against the keyring you downloaded:

cd Downloads
gpg --verify phpMyAdmin-latest-all-languages.tar.gz.asc

  1. Create a phpMyAdmin directory in the Apache web root directory:

sudo mkdir /var/www/html/phpMyAdmin

  1. Access the Downloads directory and unpack the phpMyAdmin tar.gz files to the newly created directory:

cd Downloads

sudo tar xvf phpMyAdmin-latest-all-languages.tar.gz --strip-components=1 -C /var/www/html/phpmyadmin

  1. Create a default configuration file:

sudo cp /var/www/html/phpmyadmin/config.sample.inc.php /var/www/html/phpmyadmin/config.inc.php

  1. Use the nano text editor (or your preferred text editor), to add a secret passphrase to the config.inc.php file:

sudo nano /var/www/html/phpmyadmin/config.inc.php

  1. Locate the following line:

['blowfish_secret'] = '';

  1. Add a secret passphrase as follows:

['blowfish_secret'] = 'my_secret_passphrase';

Use a complex passphrase of your choice and then exit and save the file (Ctrl+x).

  1. Change the permissions for the config.inc.phpfile:

sudo chmod 660 /var/www/html/phpmyadmin/config.inc.php

  1. Change ownership of the phpMyAdmin directory:

sudo chown –R www-data:www-data /var/www/html/phpmyadmin

  1. Restart Apache:

sudo systemctl restart apache2

  1. Use your preferred web browser and navigate to the following web address:

localhost/phpmyadmin

The system prompts the phpMyAdmin login screen and establishes a connection to the local Apache, MariaDB, and PHP files that you have created.

  1. Log in to phpMyAdmin with the username and password for the MariaDB user you created and granted privileges to. Take your time and explore the many options and settings phpMyAdmin has to offer.

De Linus

Qual é a diferença entre uma base de dados tradicional e uma base de dados moderna? :: Quão preciso é o velocímetro Waze? Nem sempre coincide com o do carro.