首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法为MySQL "root“用户设置密码,启动:作业启动失败

无法为MySQL "root“用户设置密码,启动:作业启动失败
EN

Ask Ubuntu用户
提问于 2015-08-13 01:18:08
回答 1查看 6.5K关注 0票数 0
代码语言:javascript
复制
     ┌───────────────────────Configuring mysql-server-5.5─────────────────────────┐
     │ Unable to set password for the MySQL "root" user                           │
     │                                                                            │
     │ An error occurred while setting the password for the MySQL                 │
     │ administrative user. This may have happened because the account already    │
     │ has a password, or because of a communication problem with the MySQL       │
     │ server.                                                                    │
     │                                                                            │ 
     │ You should check the account's password after the package installation.    │
     │                                                                            │ 
     │ Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for     │ 
     │ more information.                                                          │ 
     │                                                                            │
     │                                                                            │
     ├────────────────────────────────────────────────────────────────────────────┤ 
                                      │ < OK > │ 
     └────────────────────────────────────────────────────────────────────────────┘
start: Job failed to start 
invoke-rc.d: initscript mysql, action "start" failed. 
dpkg: error processing package mysql-server-5.5 (--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.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured 
Processing triggers for libc-bin (2.19-0ubuntu6.6) ... 
Processing triggers for ureadahead (0.100.0-16) ... 
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server 
E: Sub-process /usr/bin/dpkg returned an error code (1)

在此之后,我发布了ps -e | grep mysqld,但没有输出。

我试过了下面的每一件事,但问题仍然存在:

代码语言:javascript
复制
dpkg -S etc/mysql
aptitude purge mysql-server --purge-unused
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql
sudo rm -rf /etc/mysql
sudo dpkg --configure -a
sudo apt-get update 

我也试过了,但没有运气:

代码语言:javascript
复制
sudo apt-get purge mysql-server mysql-client mysql-common mysql-client-5.5 mysql-server-5.5 
sudo dpkg -i mysql-5.6.13-debian6.0-i686.deb 
sudo apt-get install mysql-server

我该怎么做?

EN

回答 1

Ask Ubuntu用户

发布于 2015-08-13 14:44:19

用您尝试过的所有命令都很难看出您的系统到底是什么配置。你读过第一部分中建议的/usr/share/doc/mysql-server-5.5/README.Debian吗?

不管怎样,我会试试的:sudo dpkg-reconfigure mysql

这将使您有机会输入MySQL的根密码(不要与linux root用户混淆)。

如果成功,启动MySQL:sudo service mysql start

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/660784

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档