将MySQL 8安装到Debian 10时出现问题



我试图将MySQL 0.8.16-1安装到Debian 10系统中。我遵循了以下描述:

https://serverspace.io/support/help/how-to-install-mysql-on-debian-10/以下是我运行的命令:

sudo apt update
sudo apt install gnupg
cd /tmp
wget https://dev.mysql.com/get/mysql-apt-config_0.8.16-1_all.deb
sudo apt-get update
sudo apt-get install mysql-community-server

在安装结束时,我总是在日志中得到以下内容:

emitting matrix      : 100% |###########################################|  
done!
update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-community-client (8.0.22-1debian10) ...
Setting up mysql-client (8.0.22-1debian10) ...
Setting up mysql-community-server (8.0.22-1debian10) ...
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
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
Errors were encountered while processing:
mysql-community-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

我已经尝试过完全删除MySQL并重新安装。清除后,自动清除和自动清理运行:

sudo apt-get dist-upgrade

并再次运行安装,但没有帮助。

我检查了目录/etc/mysql,但对我来说似乎还可以:

drwxr-xr-x  3 root root 4096 Jan  7 07:46 .
drwxr-xr-x 73 root root 4096 Jan  7 07:46 ..
lrwxrwxrwx  1 root root   24 Jan  7 07:46 my.cnf -> /etc/alternatives/my.cnf
-rw-r--r--  1 root root 1497 Sep 23 09:40 mysql.cnf
drwxr-xr-x  2 root root 4096 Jan  7 07:46 mysql.conf.d

有什么建议导致这个问题吗?

问题是VPS服务器只有0.5 gb的RAM。对于MySQL 8.0,建议最低4 gb!我知道这是一个愚蠢的错误,但也许有人可以从中吸取教训。

最新更新