gpt4 book ai didi

sql - 在 Ubuntu 18.04 中完全删除 MariaDB 10.01

转载 作者:行者123 更新时间:2023-12-03 23:27:40 24 4
gpt4 key购买 nike

我在尝试 完全清除 Maria DB 并重新安装时遇到问题。

这就是我删除它的方法:

 2073  sudo apt-get remove --purge maria*
2074 rm -f /var/log/mariadb
2075 rm -f /var/log/mariadb/mariadb.log
2076 rm -rf /var/lib/mysql
2077 rm -rf /usr/lib64/mysql
2078 rm -rf /usr/share/mysql

然后我尝试重新安装为:
sudo apt install mariadb-server
mysql_secure_installation

但问题是一旦我这样做了,我就会被提示输入 root 密码,不应该设置,因为我有 据称 清除了所有内容。

mysql_secure_installation 的输出:
[~]@Ubuntu1804  #> mysql_secure_installation 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
Enter current password for root (enter for none):
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
Enter current password for root (enter for none):
Aborting!

如果我将它留空它会失败,但是如果我尝试使用正确的密码它也会失败。

如何从服务器中删除 与 MariaDB 相关的所有 内容?

最佳答案

只需运行此命令

sudo apt-get purge mariadb-* 

关于sql - 在 Ubuntu 18.04 中完全删除 MariaDB 10.01,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60345231/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com