Ubuntu, MySQL "#2002 Cannot log in to the MySQL server"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Konkor
    Junior Member
    • Jun 2011
    • 24

    #1

    Ubuntu, MySQL "#2002 Cannot log in to the MySQL server"

    I have a website that is hosted off my linux desktop, I use the MySQL for a guestbook and stuff but recently when I try to log in to PHPMyAdmin it says "#2002 Cannot log in to the MySQL server" and everything that uses MySQL says "Cannot Connect to Server" I tried "sudo service mysql reload", tried restarting apache2, restarting my computer even changed "localhost" to "127.0.0.1" in the config.inc.file thing then reloaded everything again, but still nothing works. Does anyone have any ideas or suggestions? I have been googling all morning.
    Check out my website
  • GastonJ
    V.I.P. Member
    • Dec 2009
    • 5505

    #2
    Is mysqld actually starting and running? Try

    /etc/init.d/mysql status

    to check on the status and work from there. If it is running try a manual connect, I assume you have the mysql client installed? with:

    mysql -u username -p

    enter the password and you should be ok. If that all works, then you may need to reconfigure PHPMyadmin. I normally use Webmin rather that PHPMyAdmin out of preference.

    HTH
    My master plan is to live forever..... going to plan so far
    Despite the cost of living, it's still very popular.
    No good deed goes unpunished....

    Comment

    Working...