[ERROR] [MY-011300] [Server] Plugin mysqlx reported: ‘Setup of socket: ‘/var/lib/mysql/mysqlx.sock‘

这篇博客主要介绍了如何处理MySQL的sock配置路径不一致导致的问题。通过查看/etc/my.cnf,发现sock配置为/usr/share/mysql/sock/mysql.sock,但ls命令在/var/lib/mysql/目录下找不到mysqlx.sock。解决方案是创建软链接,并赋予mysql用户对/var/lib/mysql/目录的权限。具体步骤包括使用sudo ln -s命令创建链接,然后用sudo chown mysql -R /var/lib/mysql/来更改文件权限。

(1)查看/etc/my.cnf,显示sock配置路径

socket=/usr/share/mysql/sock/mysql.sock

(2)ls -l /usr/share/mysql/sock/mysqlx.sock能查看到mysqlx.sock

ls -l /var/lib/mysql/mysqlx.sock不能查看到mysqlx.sock

解决办法

第一步 创建链接

sudo ln -s /usr/share/mysql/sock/mysql.sock /var/lib/mysql/mysqlx.sock

第二部 添加用户文件拥有权限

sudo chown mysql -R /var/lib/mysql/

2025-08-27T05:56:31.349576Z 0 [System] [MY-015015] [Server] MySQL Server - start. 2025-08-27T05:56:31.939561Z 0 [System] [MY-010116] [Server] /usr/local/mysql-8.1.0/bin/mysqld (mysqld 8.1.0) starting as process 14263 2025-08-27T05:56:31.950700Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. 2025-08-27T05:56:32.054141Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-08-27T05:56:32.430092Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-08-27T05:56:33.888163Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible' 2025-08-27T05:56:33.888268Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of bind-address: '*' port: 33060 failed, `bind()` failed with error: Address already in use (98). Do you already have another mysqld server running with Mysqlx ?' 2025-08-27T05:56:33.888300Z 0 [ERROR] [MY-013597] [Server] Plugin mysqlx reported: 'Value '*' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.' 2025-08-27T05:56:33.888347Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/tmp/mysqlx.sock' failed, another process with PID 5744 is using UNIX socket file' 2025-08-27T05:56:34.297471Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-08-27T05:56:34.297723Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-08-27T05:56:34.313493Z 0 [ERROR] [MY-010259] [Server] Another process with pid 5744 is using unix socket file. 2025-08-27T05:56:34.313551Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file. 2025-08-27T05:56:34.313581Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-08-27T05:56:35.796342Z 0 [System] [MY-010910] [Server] /usr/local/mysql-8.1.0/bin/mysqld: Shutdown complete (mysqld 8.1.0) MySQL Community Server - GPL. 2025-08-27T05:56:35.798706Z 0 [System] [MY-015016] [Server] MySQL Server - end. 2025-08-27T06:02:15.842044Z 0 [System] [MY-015015] [Server] MySQL Server - start. 2025-08-27T06:02:16.418086Z 0 [System] [MY-010116] [Server] /usr/local/mysql-8.1.0/bin/mysqld (mysqld 8.1.0) starting as process 14970 2025-08-27T06:02:16.429657Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous. 2025-08-27T06:02:16.448679Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-08-27T06:02:16.779870Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-08-27T06:02:18.152633Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible' 2025-08-27T06:02:18.152736Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of bind-address: '*' port: 33060 failed, `bind()` failed with error: Address already in use (98). Do you already have another mysqld server running with Mysqlx ?' 2025-08-27T06:02:18.152766Z 0 [ERROR] [MY-013597] [Server] Plugin mysqlx reported: 'Value '*' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.' 2025-08-27T06:02:18.152894Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/tmp/mysqlx.sock' failed, another process with PID 5744 is using UNIX socket file' 2025-08-27T06:02:18.387015Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-08-27T06:02:18.387147Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-08-27T06:02:18.401802Z 0 [ERROR] [MY-010259] [Server] Another process with pid 5744 is using unix socket file. 2025-08-27T06:02:18.401908Z 0 [ERROR] [MY-010268] [Server] Unable to setup unix socket lock file. 2025-08-27T06:02:18.401966Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-08-27T06:02:19.973189Z 0 [System] [MY-010910] [Server] /usr/local/mysql-8.1.0/bin/mysqld: Shutdown complete (mysqld 8.1.0) MySQL Community Server - GPL. 2025-08-27T06:02:19.975574Z 0 [System] [MY-015016] [Server] MySQL Server - end.
08-28
tail -n 50 /usr/local/var/mysql/*.err 2025-06-03T03:08:36.6NZ mysqld_safe Logging to '/usr/local/var/mysql/linlinxindeMacBook-Pro.local.err'. 2025-06-03T03:08:36.6NZ mysqld_safe Starting mysqld daemon with databases from /usr/local/var/mysql 2025-06-03T03:08:37.017646Z 0 [System] [MY-015015] [Server] MySQL Server - start. 2025-06-03T03:08:37.204929Z 0 [System] [MY-010116] [Server] /opt/homebrew/Cellar/mysql/9.3.0/bin/mysqld (mysqld 9.3.0) starting as process 45275 2025-06-03T03:08:37.208037Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /usr/local/var/mysql/ is case insensitive 2025-06-03T03:08:37.214346Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2025-06-03T03:08:37.288060Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2025-06-03T03:08:38.352099Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible' 2025-06-03T03:08:38.352199Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of bind-address: '127.0.0.1' port: 33060 failed, `bind()` failed with error: Address already in use (48). Do you already have another mysqld server running with Mysqlx ?' 2025-06-03T03:08:38.352228Z 0 [ERROR] [MY-013597] [Server] Plugin mysqlx reported: 'Value '127.0.0.1' set to `Mysqlx_bind_address`, X Plugin can't bind to it. Skipping this value.' 2025-06-03T03:08:38.352257Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/tmp/mysqlx.sock' failed, another process with PID 45103 is using UNIX socket file' 2025-06-03T03:08:38.466246Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed. 2025-06-03T03:08:38.466273Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2025-06-03T03:08:38.467319Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: Address already in use 2025-06-03T03:08:38.467331Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 3306 ? 2025-06-03T03:08:38.467348Z 0 [ERROR] [MY-010119] [Server] Aborting 2025-06-03T03:08:39.435363Z 0 [System] [MY-010910] [Server] /opt/homebrew 服务
06-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值