I have the same problem it won't even start manually help!!!!
I have the same problem it won't even start manually help!!!!
this error occurs because of incomplete installation..
follow the procedure described here..
http://tolearnfree.blogspot.com/2009...mysql-and.html
enjoy
hi
i had also same problem. I just open synaptic package manager and removed the phpmyadmin and reinstalled it by synaptic package manager and also restart my pc
and logged in by root user and switch to another one i found it working in both root and normal user
thanks
There's a lot of talk of reinstalling mysql & other packages - my experience in resolving this issue did not involve reinstalling / removing anything - of-course the cause of me getting this error message could be different to your cause of getting the same error message - anyway this was my experience - hope it helps some one:
Everything was OK for months, with the machine being restarted multiple times ... until I ran this line to shutdown the mysql server
438 mysqladmin -hlocalhost -uroot -p<password> shutdown;
439 mysqladmin -hlocalhost -uroot -p<password>;
got this error : ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
& from then on keep getting this error plus the can't find /var/run/mysqld/mysqld.sock - which yes did not exist
-- below your see that I created an empty mysqld.sock file and gave it 775 permissions - may be this helped.
-- then essentially sudo /etc/init.d/mysql restart
-- worked - these all my trial & error commands from my command history - I've hidden the p/w with <password> of-course
--
440 status
441 mysqladmin -hlocalhost -uroot -p<password> status;
442 mysqladmin -hlocalhost -uroot -p<password> ping;
443 mysqladmin -hlocalhost -uroot -p<password> start;
444 mysql -hlocalhost -uroot -p<password>;
got this error : ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
445 /etc/rc.d/init.d/mysqld start
446 service mysql start
447 mysql -hlocalhost -uroot -p<password>
448 mysql -hlocalhost -uroot -p<password>;
449 /etc/rc.d/init.d/mysqld start
450 mysqladmin -hlocalhost -uroot -p<password> start;
451 /etc/init.d/mysql start
452 mysql -hlocalhost -uroot -p<password>
453 cd var/run/mysqld
454 cd /var/run/mysqld
455 ls -l
456 ls -alF
created mysqld.sock file:
457 touch mysqld.sock
458 sudo touch mysqld.sock
459 ls -l
460 mysql -hlocalhost -uroot -p<password>
461 mysqladmin -hlocalhost -uroot -p<password> shutdown;
462 ls -l
463 /etc/init.d/mysql start
464 mysql -hlocalhost -uroot -p<password>
465 sudo chmod 775 /var/lib/mysql
466 mysql -hlocalhost -uroot -p<password>
still getting this error all the time : ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)
467 sudo chmod 775 /var/run/mysqld ****** may be this helped ?
468 mysql -hlocalhost -uroot -p<password>
469 ls -alF
470 sudo chmod 775 /var/run/mysqld/mysqld.sock
471 mysql -hlocalhost -uroot -p<password>
still got this error : ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)
472 sudo /etc/init.d/mysql restart ******************* this line seemed to sort it all out - ie restarting the mysql service ***
473 mysql -hlocalhost -uroot -p<password>
************ this last line worked fine - now everything is back to normal - I am no longer getting any errors just like I have not done for months before I today ran
mysqladmin -hlocalhost -uroot -p<password> shutdown;
OK asking for punishment I am going to run
mysqladmin -hlocalhost -uroot -p<password> shutdown;
again (must be mad).
yes - I get the same problem again - so now to fix it...
yep fixed it ... - this is my command line history below:
vince@vince-laptop:~$ mysqladmin -hlocalhost -uroot -p<password> shutdown
vince@vince-laptop:~$ mysql -hlocalhost -uroot -p<password>
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
vince@vince-laptop:~$ sudo /etc/init.d/mysql restart
[sudo] password for vince:
* Stopping MySQL database server mysqld [ OK ]
* Starting MySQL database server mysqld [ OK ]
* Checking for corrupt, not cleanly closed and upgrade needing tables.
vince@vince-laptop:~$ mysql -hlocalhost -uroot -p<password>
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 52
Server version: 5.1.37-1ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
so all OK & working fine again - it looks like
vince@vince-laptop:~$ mysqladmin -hlocalhost -uroot -p<password> shutdown
is not shutting down cleanly
and
vince@vince-laptop:~$ sudo /etc/init.d/mysql restart
fixes this.
Hope this helps someone!
maybe you can try replace the current my.cnf file with the previous version, I think your older one you used before upgrade should be still in the same directory with another name.
I know this is an old thread but I got this same error message after upgrading my Ubuntu server from 9.10 to 10.4 and running sudo apt-get install mysql-server solved the problem for me.
No idea why the Ubuntu upgrading tool would leave the server in a state of no mysql server, but I'm glad it was an easy fix.
I got the same error when I installed phpmyadmin in my new Ubuntu 10.10 without installing mysql-server manually (usually it installs mysql-server by default when installing phpmyadmin)
so the cause of the error *for me* was not complete installation and by installing mysql-server everything got OK.
I'm getting millions of these messages in dmesg log:
[60253.081098] type=1400 audit(1297875316.964:1952): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=28453 comm="apparmor_parser"
And I can't connect to mysql-server through localhost, 127.0.0.1, or the sockets. I checked for sockets at /temp/mysqld.sock and /var/run/mysqld/mysqld.sock while mysql-server was running but both don't exist.
I also have tried purging mysql-* packages and reinstalling, but when entering my root password while installing mysql-server-5.1 I get an error message saying the password was not able to be set (assuming its because the server isn't connectable).
Is there a program equivalent to the windows program "WAMP Server"?
if there is, just remove the mysql installation and phpmyadmin and install that instead. It contains everything you need for a server.
I had that problem and I tried to reinstall: nothing.
to correctly reinstall all use these commands, then it should work.
Code:sudo apt-get remove mysql-server libapache2-mod-auth-mysql php5-mysql sudo apt-get autoremove sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
Bookmarks