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
[pastacode lang=”php” manual=”gksu%20gedit%20%2Fetc%2Fapache2%2Fapache2.conf%20%0A” message=”php code” highlight=”” provider=”manual”/]
  • You can add the following line to the end of the file.
[pastacode lang=”php” manual=”Include%20%2Fetc%2Fphpmyadmin%2Fapache.conf%20%0A” message=”php code” highlight=”” provider=”manual”/]
  • Then restart apache
[pastacode lang=”php” manual=”%2Fetc%2Finit.d%2Fapache2%20restart%20%0A” message=”php code” highlight=”” provider=”manual”/]

Sample code:

[pastacode lang=”php” manual=”sudo%20ln%20-s%20%2Fetc%2Fphpmyadmin%2Fapache.conf%20%2Fetc%2Fapache2%2Fconf-available%2Fphpmyadmin.conf%20%0Asudo%20a2enconf%20phpmyadmin%20%0Asudo%20service%20apache2%20reload%20%0A” message=”php code” highlight=”” provider=”manual”/] [ad type=”banner”]

Ubuntu 16.04

  • After installing and setting up user and password in mysql and phpmyadmin execute following command
[pastacode lang=”php” manual=”sudo%20apt%20install%20php-gettext%0A” message=”php code” highlight=”” provider=”manual”/]

  • Open terminal and the user using the command:
[pastacode lang=”php” manual=”sudo%20su%0A” message=”php code” highlight=”” provider=”manual”/]
  • 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

 

[pastacode lang=”php” manual=”sudo%20cp%20%2Fetc%2Fapache2%2Fconf-available%20%2Fetc%2Fapache2%2Fconf-enabled%20%0A” message=”php code” highlight=”” provider=”manual”/]
  • Restart apache2 (sudo service apache2 restart) and then open the link localhost/phpmyadmin in a browser.

[pastacode lang=”javascript” manual=”sudo%20sed%20-i%20’%24%20a%5CInclude%20%2Fetc%2Fphpmyadmin%2Fapache.conf’%20%2Fetc%2Fapache2%2Fapache2.conf%20%26%26%20sudo%20service%20apache2%20restart%20%26%26%20sudo%20apt-get%20install%20php-gettext%60%20%0A” message=”javascript code” highlight=”” provider=”manual”/] [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:
[pastacode lang=”php” manual=”mv%20%2Fusr%2Fshare%2Fphpmyadmin%20%2Fvar%2Fwww%2Fphpmyadmin%0A” message=”php code” highlight=”” provider=”manual”/]
  • 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:

[pastacode lang=”php” manual=”sudo%20ln%20-s%20%2Fusr%2Fshare%2Fphpmyadmin%20%2Fvar%2Fwww%0A” message=”php code” highlight=”” provider=”manual”/]

Categorized in: