重启计算机

重启计算机

从昨天起我就无法访问 mySQL 服务器,它给出了以下信息:

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

在花了几个小时尝试重新启动 mySQL 服务器后,我意识到服务器已崩溃 [可能的原因:两个用户同时访问 mySQL 服务器,一个用户通过 mySQL-workbench 从本地 Linux 系统访问(这是我),另一个用户通过 mySQL-workbench 从 Windows 系统访问,并且也尝试通过 SAS 程序检索数据]。

所以我决定重新安装 mySQL 服务器。但是,我无法在 ubuntu 上安装 mySQL 服务器………

以下是我尝试过的方法:

$ killall mysql

mysql:未找到进程

$ killall mysqld

mysql:未找到进程

$ killall mysqld_safe

mysqld:未找到进程

$ 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

重启计算机

$ sudo apt-get install mysql-server

(安装结束时,我得到了这个)

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

请帮我弄清楚,非常感谢!

相关内容