mysql 不会重启

Gur*_*ngh 2 mysql

我正在尝试使用该命令启动 mysql 服务器

sudo /etc/init.d/mysql start

但它不会开始。我没有得到一个特定的错误,我看到的是

* Starting MySQL database server mysqld [fail]

我尝试了相同的命令,但使用了restart相同的结果。我也试过用

sudo service start mysql

我被困在这一点上。如果我能提供更多信息,请告诉我。

谢谢你。

这是我的 mysql error.log

150505 21:43:49 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
150505 21:43:49 [Note] Plugin 'FEDERATED' is disabled.
150505 21:43:49 InnoDB: The InnoDB memory heap is disabled
150505 21:43:49 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150505 21:43:49 InnoDB: Compressed tables use zlib 1.2.8
150505 21:43:49 InnoDB: Using Linux native AIO
150505 21:43:49 InnoDB: Initializing buffer pool, size = 128.0M
150505 21:43:49 InnoDB: Completed initialization of buffer pool
150505 21:43:49 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 30152041
150505 21:43:49  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 30161741
Run Code Online (Sandbox Code Playgroud)

mur*_*ain 5

我知道这个问题很久以前就发布了。但是我已经找到了解决方案,因为我遇到了同样的问题。由于在操作系统中多次安装 MySQL,可能会发生此错误。

sudo ps -A|grep mysql  
Run Code Online (Sandbox Code Playgroud)

杀死进程 mysql

sudo pkill mysql  
Run Code Online (Sandbox Code Playgroud)

然后运行命令

sudo ps -A|grep mysqld  
Run Code Online (Sandbox Code Playgroud)

杀死进程 mysqld

sudo pkill mysqld  
Run Code Online (Sandbox Code Playgroud)

现在您可以安全地重新启动 MySQL 服务器了

sudo service mysql restart    
mysql -u root -p  
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助