I can't access http://localhost/phpmyadmin/

Problem:

I can't access localhost/phpmyadmin/

before I can access localhost/phpmyadmin/ but today when I'm trying to access this page I got weird page

also I can access localhost/xampp/ without any problem

Question:

How can I solve this problem ?


what you need to do is to add phpmyadmin to the apache configuration:

sudo nano /etc/apache2/apache2.conf

Add the phpmyadmin config to the file:

Include /etc/phpmyadmin/apache.conf

then restart apache:

sudo service apache2 restart

On windows, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache


A cleaner way is to create the new configuration file:

/etc/apache2/conf-available/phpmyadmin.conf

and write the following in it:

Include /etc/phpmyadmin/apache.conf

then, soft link the file to the directory /etc/apache2/conf-enabled:

sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled

You should use localhost:portnumber/phpmyadmin Here the Portnumber is the number which you set for your web server or if you have not set it until now it is by Default - 80.


Make sure that both apache webserver and MySQL server are running. I had the same failure because I forgot to start my webserver.