ubuntu-11.04
- When we try http://localhost/phpmyadmin/
- We get this error on my browser
- You will need to configure your apache2.conf
- You can add the following line to the end of the file.
- Then restart apache
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
- Open terminal and the user using the command:
- 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.
- Firstly check if the directory /usr/share/phpmyadmin/ exists. If it does, just move it to /var/www/phpmyadmin by executing this command:
- 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”/]