无法在Linux Mint 19中安装mysql

时间:2019-04-04 18:11:38

标签: mysql linuxmint

你好,我昨天是Linux的初学者,我尝试在我的笔记本电脑上安装linux mint ..,然后先安装apache succesfull,但在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清除mysql *

sudo apt-get autoremove

sudo apt-get autoclean

sudo apt-get dist-upgrade

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

1 个答案:

答案 0 :(得分:0)

我多次在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服务器。老实说,我建议使用它,因为它使您的生活更加轻松。