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".

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

  • 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 localhost/phpmyadmin – Geppettvs D'Constanzo May 1 '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 1 '15 at 19:03
  • 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 1 '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 1 '15 at 19:16
  • 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 1 '15 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.