您尚未登录。

#1 2021-08-14 21:15:10

取名字这件事令我头疼
Arch 小白
所在地: 中国江西省
注册时间: 2021-08-06
帖子: 11
个人网站

arch mysqld 无法启动

输入

systemctl start mysqld

之后输出如下

Job for mysqld.service failed because the control process exited with error code.
See "systemctl status mysqld.service" and "journalctl -xeu mysqld.service" for details.
systemctl status mysqld.service  # 的输出为
× mysqld.service - MySQL Server
     Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disa>
     Active: failed (Result: exit-code) since Sat 2021-08-14 21:07:58 CST; 3min 52s ago
       Docs: man:mysqld(8)
             http://dev.mysql.com/doc/refman/en/using-systemd.html
    Process: 8403 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
    Process: 8425 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS (code=exited, status=1/FAILURE)
   Main PID: 8425 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 22 (无效的参数)
        CPU: 678ms

8月 14 21:07:57 archlinux mysqld[8425]: 2021-08-14T13:07:57.139511Z 0 [Warning] [MY-010441>
8月 14 21:07:57 archlinux mysqld[8425]: 2021-08-14T13:07:57.139923Z 0 [ERROR] [MY-013129] >
8月 14 21:07:57 archlinux mysqld[8425]: 2021-08-14T13:07:57.140170Z 0 [Warning] [MY-013129>
8月 14 21:07:57 archlinux mysqld[8425]: 2021-08-14T13:07:57.140901Z 0 [ERROR] [MY-010326] >
8月 14 21:07:57 archlinux mysqld[8425]: 2021-08-14T13:07:57.141172Z 0 [ERROR] [MY-010952] >
8月 14 21:07:57 archlinux mysqld[8425]: 2021-08-14T13:07:57.141720Z 0 [ERROR] [MY-010119] >
8月 14 21:07:58 archlinux mysqld[8425]: 2021-08-14T13:07:58.602748Z 0 [System] [MY-010910]>
8月 14 21:07:58 archlinux systemd[1]: mysqld.service: Main process exited, code=exited, st>
8月 14 21:07:58 archlinux systemd[1]: mysqld.service: Failed with result 'exit-code'.
8月 14 21:07:58 archlinux systemd[1]: Failed to start MySQL Server.
journalctl -xeu mysqld.service # 的输出为
8月 14 21:07:58 archlinux systemd[1]: mysqld.service: Main process exited, code=exited, st>
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit mysqld.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
8月 14 21:07:58 archlinux systemd[1]: mysqld.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit mysqld.service has entered the 'failed' state with result 'exit-code'.
8月 14 21:07:58 archlinux systemd[1]: Failed to start MySQL Server.
░░ Subject: mysqld.service 单元已失败
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ mysqld.service 单元已失败。
░░ 
░░ 结果为“failed”。
...skipping...
8月 14 21:07:58 archlinux systemd[1]: mysqld.service: Main process exited, code=exited, st>
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit mysqld.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
8月 14 21:07:58 archlinux systemd[1]: mysqld.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit mysqld.service has entered the 'failed' state with result 'exit-code'.
8月 14 21:07:58 archlinux systemd[1]: Failed to start MySQL Server.
░░ Subject: mysqld.service 单元已失败
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ mysqld.service 单元已失败。
░░ 
░░ 结果为“failed”。

人生苦短,Manjaro 是岸

离线

#2 2021-09-21 22:09:16

iamgodot
会员
注册时间: 2021-09-20
帖子: 15
个人网站

Re: arch mysqld 无法启动

参考 wiki,为什么不用 MariaDB


The world is waiting for you.

离线

#3 2021-11-10 11:15:38

发心乱了
会员
注册时间: 2021-08-25
帖子: 4

Re: arch mysqld 无法启动

为什么不用 docker 呢,docker-compose 一把梭:

docker-compose.yml

version: '3.5'

services:
  mysql:
    container_name: mysql
    image: mysql
    hostname: mysql
    command:
        --default-authentication-plugin=mysql_native_password
        --character-set-server=utf8mb4
        --collation-server=utf8mb4_general_ci
        --sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
    restart: unless-stopped
    environment:
        TZ: Asia/Shanghai
        MYSQL_ROOT_PASSWORD: "root"
    ports:
        - 3306:3306
    volumes:
        - ./data:/var/lib/mysql
        - ./conf:/etc/mysql/conf.d
        - ./log:/var/log

离线

页脚