2

I recently installed LAMPP on Ubuntu 14.04. When I start/restart Apache on terminal it shows [OK] but phpmyadmin says "Can't establish a connection to 127.0.0.1".

I have tried solutions provided in following questions but all in vain:

[1] Can't access phpMyAdmin

[2] Phpmyadmin isn't working?

[3] Phpmyadmin Not Working

Dhaval Simaria
  • 795
  • 2
  • 12
  • 29
  • LAMP Does install Apache, MySQL and PHP. By adding the "P" after "lampP" does mean that you already installed PHPMyAdmin? If you didn't it will be useful if you let us know. The solution in the question you refer seems to be for systems which have already installed phpmyadmin, after which you can reach it via http://localhost/phpmyadmin – Geppettvs D'Constanzo May 01 '15 at 19:00
  • Doesn't your error refer actually to mysql rather than apache? Have you checked your mysql instance? Is it working? Does it accept connections? – Jacek May 01 '15 at 19:03
  • Yes @GeppettvsD'Constanzo, I did install phpmyadmin but the problems is its not showing up at 127.0.0.1 – Dhaval Simaria May 01 '15 at 19:08
  • @Jacek, can you just let me know how to check mysql instance. – Dhaval Simaria May 01 '15 at 19:10
  • 1
    Well - for start I'd check whether mysqld process is running (ps aux|grep mysqld might help). If so, you can check if it's listening on the network port 3306 (netstat -na|grep 3306 might help with this one) - by default it should be allowed I believe, however in some configs network interface may be disabled and only access through socket may be allowed. As a matter of fact , you can basically try to use command line client: mysql to connect to the server and see if it works (mysql -u username -p - username would be your user, probably root? and you'll be asked for password) – Jacek May 01 '15 at 19:15
  • 1
    Quite honestly I'd strongly recommend reading mysql manual (or mariadb if you used it instead) - it's pretty good. – Jacek May 01 '15 at 19:16
  • Well @Jacek that was really informative. Here all conditions are satisfying positively. So any idea what to do next... – Dhaval Simaria May 01 '15 at 19:21
  • 1
    Make sure that whatever user/password is set for phpmysql is allowed by mysql itself (proper permissions granted?) - I believe that something has been set automatically during installation, but anyway worth checking. No more ideas for now - maybe except for looking for logs maybe yet to see if there are any errors, since your certain the mysql really works. – Jacek May 01 '15 at 19:24

0 Answers0