6

I'm new to Linux. I'm trying to install phpmyadmin on Mint.

I tried the following:

sudo apt-get install mysql-server sudo dpkg-reconfigure phpmyadmin sudo service apache2 restart

But I can't access it via : localhost/phpmyadmin.

I have installed mysql and apache. But cannot install and access phpmyadmin.

17
  • What happens when you try to load it? Commented Jan 18, 2016 at 21:15
  • It's throwing: Not Found The requested URL /phpmyadmin was not found on this server. Apache/2.4.7 (Ubuntu) Server at localhost Port 80
    – ivva
    Commented Jan 18, 2016 at 21:15
  • 1
    Can you connect to mysql from the command line using mysql -u root -p? Commented Jan 18, 2016 at 21:19
  • 1
    I think phpmyadmin is installed but mysql is not confugured yet. Did you assign a password to the mysql root user during installation? Commented Jan 18, 2016 at 21:28
  • 1
    Have you tried running sudo mysql_secure_installation? Commented Jan 18, 2016 at 21:31

3 Answers 3

10

Open the terminal, type:

sudo gedit /etc/apache2/apache2.conf

and below the end of file, at the last line, type

include /etc/phpmyadmin/apache.conf
1
  • You should include restarting apache. service apache2 restart
    – hkiame
    Commented May 8, 2021 at 11:27
6

Just ran into this issue myself.

Normally, the Debian (apt) installation stuff installs the software including some basic defaults. The install script asked if it should configure apache2, so it seems this is a bug, since when I got done, gornicht.

Everything else looked good, from phpinfo on. Searching failed to reveal any signs that phpmyinfo was installed in apache2, while MySQL had the appropriate changes.

My solution was as simple as

ln /etc/phpmyinfo/apache.conf /etc/apache2/sites-enabled/001-phpmyinfo

This hard links the default configuration from phpmyadmin's directory over to Apache2's. (Obviously, if you're running lighttp or apache 1, targets and destinations must change.) This adds the phpmyadmin "site" to the list that Apache2 serves. You should look at it for edification.

Anyhow, after that,

sudo apache2ctl restart

sudo mysqld restart

should probably get http://localhost/phpmyadmin working as expected.

(By all means, toss out constructive criticisms. I'm no expert on this.)

1
  • Thank you all for answers, in fact I succeeded in installing it. I had to reinstall it and it's working now.
    – ivva
    Commented Sep 20, 2016 at 8:49
4

I had the same issue with linux mint 18. I have uninstalled phpmyadmin completely from my system and followed the below link to install and configure php, mysql and phpmyadmin. Hope the link given below will help you (link is for ubuntu, but definitely work with mint);

how-to-install-and-configure-apachephpmysql-and-phpmyadmin-on-ubuntu

1
  • 1
    Thanks very much. This link helped me as well.
    – user5911925
    Commented Dec 17, 2017 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.