gpt4 book ai didi

mysql - 无法在 Ubuntu 18.04 上安装 MySQL 8.0

转载 作者:行者123 更新时间:2023-11-29 03:17:49 25 4
gpt4 key购买 nike

在阅读了几篇文章并观看了有关该主题的大量视频后,我仍然无法成功安装 MySQL 8.0。首先,我认为问题可能与预先存在的 MySQL 安装有关。因此,我根据此处提供的信息清除了该安装:How Do I Uninstall MySQL Completely? .删除 MySQL 后,我尝试重新安装它。例如,我遵循此处提供的指导:How to Install MySQL 8.0 on Ubuntu 18.04 LTS Bionic Beaver .我的安装在视频中 1:06 标记处出现以下语句后失败:

"Setting up mysql-community-server (8.0.11-1ubuntu18.04)..." (with one minor exception: mine reads "...(8.0.12-...")

在此之后,我尝试安装时报告了一系列错误:

update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode

my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!

my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!

my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!

my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted! mysqld: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

dpkg: error processing package mysql-community-server (--configure): installed mysql-community-server package post-installation script subprocess returned error exit status 1

dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-community-server (= 8.0.12-1ubuntu18.04); however: Package mysql-community-server is not configured yet.

这个错误没有意义,因为目录是在安装过程中创建的:

my_print_defaults: Can't read dir of '/etc/mysql/conf.d/' (OS errno 2 - No such file or directory)

我在别处读到,一个可能的问题是安装过程忽略了在 MySQL 数据库服务器配置文件中的“!include”指令末尾附加“mysqld.cnf”文件名。 (参见:Why Is /etc/mysql/my.cnf EMPTY?。)

在我的例子中,文件不是空的,但是缺少配置文件名。所以,我改变了这个:

includedir/etc/mysql/mysql.conf.d/

...到...

includedir/etc/mysql/mysql.conf.d/mysqld.cnf

不幸的是,这并没有解决问题。

感谢您的建议。

最佳答案

很抱歉这篇文章。我真的不相信我的回答。我也遇到了同样的问题。然后我卸载“libaio1”包,然后安装相同的包,它对我有用。

它在 AWS EC2 保险中运行良好。+ 我的家用电脑。购买无法在 Google 云 VM 实例中运行。

关于mysql - 无法在 Ubuntu 18.04 上安装 MySQL 8.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51777710/

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