MySQL 无法在 Ubuntu 22.04 上启动;未知变量“mysqlx-bind-address=127.0.0.1”

MySQL 无法在 Ubuntu 22.04 上启动;未知变量“mysqlx-bind-address=127.0.0.1”

我在 Ubuntu 22.04 上安装 MySQL 服务器时遇到问题。当我尝试使用命令 sudo service mysql start 启动 MySQL 服务时,出现以下错误消息

错误消息表明服务器配置错误。您能指导我完成正确的步骤以成功启动 MySQL 服务器吗?谢谢。”我知道我还没有将我的主机链接到我的域名

● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Mon 2023-07-17 01:55:02 UTC; 9ms ago
    Process: 348248 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
        CPU: 82ms

Jul 17 01:55:02 server1.elhodhod.ma mysql-systemd-start[348248]: ERROR: Unable to start MySQL server:
Jul 17 01:55:02 server1.elhodhod.ma mysql-systemd-start[348248]: 2023-07-17  1:55:02 0 [ERROR] mysqld: unknown variable 'mysqlx-bind-address=127.0.0.1'
Jul 17 01:55:02 server1.elhodhod.ma mysql-systemd-start[348248]: Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
Jul 17 01:55:02 server1.elhodhod.ma mysql-systemd-start[348248]: Once the problem is resolved, restart the service.
Jul 17 01:55:02 server1.elhodhod.ma systemd[1]: mysql.service: Control process exited, code=exited, status=1/FAILURE
Jul 17 01:55:02 server1.elhodhod.ma systemd[1]: mysql.service: Failed with result 'exit-code'.
Jul 17 01:55:02 server1.elhodhod.ma systemd[1]: Failed to start MySQL Community Server.
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 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.

Errors were encountered while processing:
 mysql-server-8.0
 mysql-server
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

mysqlx-bind-address在 MySQL 配置文件中定义了一个变量,但您的 MySQL 版本无法识别该变量,因此无法启动。您需要删除此变量并检查您的配置文件,使其与您安装的 MySQL 版本相匹配。

相关内容