如何使用“sudo”强制删除 phpmyadmin?

如何使用“sudo”强制删除 phpmyadmin?

我一直尝试使用以下方法卸载 phpmyadmin:

sudo apt-get purge phpmyadmin*

但是,在此过程中,我收到错误,并且它没有被删除。我想我混淆了 ubuntu 根密码和 phpmyadmin 根密码之类的。sudo但我肯定知道我的根密码。以下是我收到的错误:

Do you want to continue? [Y/n] Y
(Reading database ... 265659 files and directories currently installed.)
Removing phpmyadmin (4:4.0.10-1) ...
dbconfig-common: dumping mysql database phpmyadmin to /var/tmp/phpmyadmin.phpmyadmin.2015-07-29-21.04.mysql.Asn2CB.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES).
unable to connect to mysql server.
error encountered dumping database:

答案1

我假设您的 MySQL 服务器正在运行。在表中检查您的 MySQL 用户的密码root和此用户的访问权限mysql.user。在终端中使用以下mysql命令执行此操作。

如果不可能的话,运行

sudo apt-get purge phpmyadmin*

再次回答问题

   ┌────────────────────────────────────────────────────┤ Configuring phpmyadmin ├────────────────────────────────────────────────────┐
   │                                                                                                                                  │ 
   │ Since you are removing phpmyadmin, it's possible that you no longer want the underlying database.                                │ 
   │                                                                                                                                  │ 
   │ If you like, database removal can be handled with dbconfig-common.                                                               │ 
   │                                                                                                                                  │ 
   │ If you know that you do want to keep this database, or if you want to handle the removal of this database manually, you should   │ 
   │ refuse this option.                                                                                                              │ 
   │                                                                                                                                  │ 
   │ Deconfigure database for phpmyadmin with dbconfig-common?                                                                        │ 
   │                                                                                                                                  │ 
   │                                       <Yes>                                          <No>                                        │ 
   │                                                                                                                                  │ 
   └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 

相关内容