MySQL이 모든 포트를 수신하도록 만들기 Ubuntu 22.04

MySQL이 모든 포트를 수신하도록 만들기 Ubuntu 22.04

나는 이 코드를 가지고 있습니다 :

[mysqld]

bind-address = 0.0.0.0
default-storage-engine = innodb
innodb file per table
collation-server = utf8 general ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8

이것은 이전 버전의 Ubuntu용입니다. 이제 Ubuntu 22.04를 사용하고 있으며 작동시키려고 합니다. "/etc/mysql/conf.d" 디렉토리에 넣으려고 하는데 이 버전의 Ubuntu에서는 해당 위치가 아닌 것 같습니다.

코드를 입력했는데 서비스를 다시 시작하려고 하면 오류가 발생합니다.

Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.

"systemctl status mysql.service"가 제공하는 오류는 다음과 같습니다.

× mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2023-06-12 14:07:46 UTC; 6s ago
    Process: 19824 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
        CPU: 34ms

Jun 12 14:07:46 controller systemd[1]: Failed to start MySQL Community Server.
Jun 12 14:07:46 controller systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Jun 12 14:07:46 controller systemd[1]: Stopped MySQL Community Server.
Jun 12 14:07:46 controller systemd[1]: mysql.service: Start request repeated too quickly.
Jun 12 14:07:46 controller systemd[1]: mysql.service: Failed with result 'exit-code'.
Jun 12 14:07:46 controller systemd[1]: Failed to start MySQL Community Server.

어떤 제안이 있나요?

답변1

오류가 무엇인지 알아냈습니다. 실제로는 다음과 같이 쓰는 대신 위 코드의 오타 오류였습니다.

[mysqld]

bind-address = 0.0.0.0
default-storage-engine = innodb
innodb file per table
collation-server = utf8 general ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8

나는 다음과 같이 썼어야 했다:

[mysqld]

bind-address = 0.0.0.0
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8

관련 정보