1

I can't access mySQL server since yerterday, it gave me this:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

After spending several hours on trying to restart the mySQL server, I realiazed the server was crashed [possible reasons: two users were accessing mySQL server at the same time, one was from local Linux system via mySQL-workbench (this was me), the other one was from Windows system via mySQL-workbench and also tried to retrieve data vis SAS program].

So I decide to re-install the mySQL server. however, I can't intall the mySQL server on ubuntu……….

Here are the things I have tried:

$ killall mysql

mysql: no process found

$ killall mysqld

mysql: no process found

$ killall mysqld_safe

mysqld: no process found

$ sudo apt-get autoremove --purge mysql-server-5.6
$ sudo apt-get autoremove --purge mysql-client-5.6
$ sudo apt-get  autoremove --purge mysql-common
$ sudo rm -rf /var/lib/mysql /etc/mysql ~/.mysql  
$ sudo deluser mysql     
$ sudo apt-get autoclean    
$ sudo apt-get update && sudo apt-get upgrade

reboot computer

$ sudo apt-get install mysql-server

(in the end of installation, I got this)

Setting up mysql-client-core-5.6 (5.6.27-0ubuntu1) ...  
Setting up mysql-client-5.6 (5.6.27-0ubuntu1) ...  
Setting up mysql-server-core-5.6 (5.6.27-0ubuntu1) ...  
Setting up mysql-server-5.6 (5.6.27-0ubuntu1) ...  
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode     
2015-12-16 09:34:22 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).     
2015-12-16 09:34:22 0 [Note] /usr/sbin/mysqld (mysqld 5.6.27-0ubuntu1) starting as process 17129 …    
Job for mysql.service failed because a timeout was exceeded. See "systemctl status mysql.service" and "journalctl -xe" for details.     
invoke-rc.d: initscript mysql, action "start" failed.     
dpkg: error processing package mysql-server-5.6 (--configure):  subprocess installed post-installation script returned error exit status 1    
dpkg: dependency problems prevent configuration of mysql-server:     
mysql-server depends on mysql-server-5.6; however:     
Package mysql-server-5.6 is not configured yet.     
dpkg: error processing package mysql-server (--configure):     
dependency problems - leaving unconfigured  Processing triggers for libc-bin (2.21-0ubuntu4) ...  No apport report written because the error message indicates its a followup error from a previous failure.     
processing triggers for ureadahead (0.100.0-19) ...  Processing triggers for systemd (225-1ubuntu9) ...  Errors were encountered while processing:  mysql-server-5.6

please help me to figure out, many thanks!

1
  • You will want to try sudo apt-get install -f and see if that doesn't help. If it does, you should get a option to set the password. If you don't then try sudo dpkg-reconfigure MySQL-server (or just MySQL) I will also add that there has been a thread that identifies problem using a repository. This may or may not be the issue as well if you see other people having problems getting updates. If all else fails you can try sudo aptitude install MySQL-server and it may offer solutions. I don't know how to say if one is right or not over the other.
    – John75077
    Dec 16, 2015 at 17:20

0

You must log in to answer this question.

Browse other questions tagged .