【问题标题】:Can't Installing mysql in Linux mint 19无法在 Linux mint 19 中安装 mysql
【发布时间】:2019-08-26 14:18:22
【问题描述】:

我是 Linux 初学者。昨天,我尝试在我的 Linux mint 笔记本电脑上安装 MySQL。我已成功安装 Apache,但在尝试安装 MySQL 时出现以下错误。

Setting up mysql-server-5.7 (5.7.25-0ubuntu0.18.04.2) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.7; however:
  Package mysql-server-5.7 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                          Processing triggers for systemd (237-3ubuntu10.17) ...
Processing triggers for ureadahead (0.100.0-20) ...
Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

sudo apt-get purge mysql*

sudo apt-get 自动删除

sudo apt-get 自动清理

sudo apt-get dist-upgrade

我试图再次从网上找到一种方法,但没有任何效果,因此我无法入睡..:(

【问题讨论】:

  • 拜托....我不知道该怎么办

标签: mysql linux-mint


【解决方案1】:

我在 Mint 上多次安装 MySQL,但最近我开始遇到同样的问题 - 完全出乎意料。

试试这里的步骤:

https://vitux.com/how-to-install-and-configure-mysql-in-ubuntu-18-04-lts/

sudo apt-get update

sudo apt-get install mysql-server

sudo mysql_secure_installation

您的 MySQL 服务器将有几个是和否选项。选择适合你的,然后使用 sudo mysql, 而不仅仅是 mysql

登录
sudo mysql -uroot -p

提示将从您的 linux 登录用户变为 mysql>

对于自动创建的用户列表:

mysql> SELECT user,authentication_string,plugin,host FROM mysql.user;

更改root用户的身份验证方法,并根据需要分配新密码:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

现在您将能够从 MySQL 工作台访问 MySQL 服务器。老实说,我建议使用它,因为它可以让您的生活更轻松。

【讨论】:

  • @Eden 您好,Eden,您有时间尝试我建议的解决方案吗?
猜你喜欢
  • 2019-03-15
  • 2019-03-03
  • 1970-01-01
  • 2019-06-07
  • 2021-07-13
  • 2023-03-04
  • 2014-01-01
  • 2019-11-10
  • 1970-01-01
相关资源
最近更新 更多