ubuntu-11.04

  • When we try http://localhost/phpmyadmin/ 
  • We get this error on my browser
PhpMyadmin not working

PhpMyadmin not working

  • You will need to configure your apache2.conf
php code
gksu gedit /etc/apache2/apache2.conf 
  • You can add the following line to the end of the file.
php code
Include /etc/phpmyadmin/apache.conf 
  • Then restart apache
php code
/etc/init.d/apache2 restart 

Sample code:

php code
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf 
sudo a2enconf phpmyadmin
sudo service apache2 reload
[ad type=”banner”]

Ubuntu 16.04

  • After installing and setting up user and password in mysql and phpmyadmin execute following command
php code
sudo apt install php-gettext

  • Open terminal and the user using the command:
php code
sudo su
  • After installing phpmyadmin using instructions, open /etc/apache2/conf-available
  • You will find a file named phpmyadmin.conf. Copy it to /etc/apache2/conf-enabled

simply use the command

 

php code
sudo cp /etc/apache2/conf-available /etc/apache2/conf-enabled 
  • Restart apache2 (sudo service apache2 restart) and then open the link localhost/phpmyadmin in a browser.

javascript code
sudo sed -i '$ a\Include /etc/phpmyadmin/apache.conf' /etc/apache2/apache2.conf && sudo service apache2 restart && sudo apt-get install php-gettext` 
[ad type=”banner”]

  • Firstly check if the directory /usr/share/phpmyadmin/ exists. If it does, just move it to /var/www/phpmyadmin by executing this command:
php code
mv /usr/share/phpmyadmin /var/www/phpmyadmin
  • Open your browser and open http://localhost/phpmyadmin.

Ubuntu 16.04

Two options

Enter these commands for the specific error if your prior configuration:

  • sudo apt-get update
  • sudo apt-get install php-gettext php-mbstring
  • sudo service apache2 restart

Or remove and start a fresh install:

  • sudo service mysql stop
  • sudo apt-get –purge remove mysql*
  • sudo apt-get –purge remove phpmyadmin
  • sudo apt-get autoremove
  • sudo apt-get autoclean
  • sudo apt-get update
  • sudo apt-get install mysql-server phpmyadmin php-gettext php-mbstring
  • sudo service apache2 restart

Run the following code with root permission in terminal:

php code
sudo ln -s /usr/share/phpmyadmin /var/www

Categorized in: