phpmyadmin throws a 404 on opening

It seems to me that you forgot to tick apache during the phpmyadmin installation screen. You can check if that is the case by checking for the presence of /etc/apache2/conf.d /phpmyadmin file.

You can reconfigure phpmyadmin with the following command:

sudo dpkg-reconfigure phpmyadmin

You will see the following screen:

Choose Web Server

Tick apache (using spacebar), and tab to OK.


I know this is a very old problem, so if you encounter such an error and the above does not help you, this might:

Use this command sudo nano /etc/apache2/apache2.conf to open the file using nano then add the following line:

Include /etc/phpmyadmin/apache.conf

Save and close. Then restart the server. This should work.


Maybe it is an apache permission problem. Try to put in your /etc/apache2/sites-available/default the following lines

<Directory /> AllowOverride All </Directory>

and check that the /var/www folders owner is www-data

==================================================================================

Install mysql server: sudo apt-get install mysql-server

Here the installer will ask the mysql-server root password

Install apache 2: sudo apt-get install apache2

Test it: localhost (You must see "It works!" etc)

Install php5: sudo apt-get install php5

sudo apt-get install libapache2-mod-php5

sudo /etc/init.d/apache2 restart

Testing it: create the file php_info.php in /var/www/

The content of the file: <?php phpinfo(); ?>

Install php modules: sudo apt-get install php-pear php5-gd php5-xsl curl libcurl3 libcurl3-dev php5-curl

Connect apache 2 and mysql together: sudo apt-get install libapache2-mod-auth-mysql

Install phpmyadmin:

`sudo apt-get install php5-mysql`
`sudo apt-get install phpmyadmin`

Connect php5 with mysql server:

Edit the file /etc/php/apache2/php.ini

Uncomment the following line: extension=mysql.so

Restart apache: service apache2 restart

Try phpmyadmin: localhost/phpmyadmin/

This worked for me many times.