博文背景
本人在Ubuntu20.04系统下使用apt安装MySQL8后直接使用mysqld命令启动会发现无法启动成功,查看日志遇到[MY-010273] [Server] Could not create unix socket lock file /var/run/mysqld/mysqld.sock.lock.的报错。
日志分析
2020-09-25T01:23:33.191419Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.21-0ubuntu0.20.04.4) starting as process 1712
2020-09-25T01:23:33.206763Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2020-09-25T01:23:33.476816Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2020-09-25T01:23:33.593919Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
2020-09-25T01:23:33.594205Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
2020-09-25T01:23:33.698046Z 0 [Warning] [MY-010068] [Serv