Ubuntu Mysql卸载/重新安装

时间:2015-02-24 03:44:17

标签: mysql ubuntu-14.04 uninstall reinstall

我有一个Mysql安装我想删除并重新安装,在LAMP堆栈上运行Ubuntu 14.04。密码都搞砸了,phpmyadmin没有正确安装......我只想重新启动。

命令..

sudo apt-get --purge remove mysql-server mysql-common mysql-client

返回以下错误...

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

我正在努力弄清楚该怎么做。

这个命令......

sudo dpkg-reconfigure mysql-server-14.14

告诉我......

package 'mysql-server-14.14' is not installed and no information is available

虽然..

mysql --version

告诉我......

mysql  Ver 14.14 Distrib 5.5.40, for debian-linux-gnu (x86_64) using readline 6.3

我有什么想法可以擦干净并重新启动?

谢谢。

3 个答案:

答案 0 :(得分:1)

  1. 首先,使用-sudo apt-get remove --purge mysql-server mysql-client mysql-common

    删除已安装的mysql-server。
  2. 然后清理所有文件sudo apt-get autoremove

  3. 然后安装mysql-server-sudo apt-get install -f mysql-server

  4. 启动mysql服务器-sudo systemctl start mysql

  5. 检查mysql服务器的状态-systemctl status mysql

答案 1 :(得分:0)

可能剥离--

sudo apt-get purge mysql-server mysql-common mysql-client
sudo apt-get install mysql-client mysql-server mysql-common

答案 2 :(得分:0)

尝试这样做:

sudo apt-get install aptitude

sudo aptitude purge mysql-server mysql-common mysql-client  

sudo aptitude install mysql-client mysql-server mysql-common