MySQL not working. Error: 'mysqladmin: connect to server at 'localhost' failed'

I had managed to install MySQL successfully but after I shut down and restart, it fails. It was installed such that the SQL server would run automatically whenever the system is running. I’ve re-installed it once. I’m very new to web development and MySQL. Please help. I’ve attached the error screenshot.

I’ve searched for mysqld.sock, but unable to locate it. I had set a password to access the server, which does not work anymore. Trawling the Internet has not helped. Sitepoint was recommended by the author of the book I’m referring.

Mysql is (most likely) not running. You’ll just need to run the start command to get it up and running.

What version of linux are you running?

I updated to Ubuntu 12.04 some time back…

The first thing I would try is to manually start the server and see if it works. If it does work, then you’ll need to figure out why it doesn’t startup automatically.

This should do the trick:

sudo service mysql start

You could also try:

sudo start mysql

If that does not work you may want to try completely removing MySQL and starting over: http://askubuntu.com/questions/125686/mysql-fails-to-start-after-upgrade-installation-etc

I don’ know what happened but upon re-installation, it’s running fine… thank you for the help…