无法在Linux中安装mysql 19

问题描述 投票:1回答:1

您好我是linux的初学者昨天我尝试在我的笔记本电脑上安装linux mint ..并且首先安装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 autoremove

sudo apt-get autoclean

sudo apt-get dist-upgrade

我试图再次从网上找到一种方式到网络但没有任何作品,我无法入睡因为这... :(

mysql linuxmint
1个回答
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服务器。老实说,我建议使用它,因为它会让你的生活更轻松。

© www.soinside.com 2019 - 2024. All rights reserved.