2023-06-02T11:04:50.558951Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root! 2023-06-02T11:04:50.559014Z 0 [ERROR] [MY-010119] [Server] Aborting
时间: 2023-12-07 07:05:22 浏览: 60
这个错误信息表示 MySQL 不能以 root 用户身份运行。这是为了保证 MySQL 的安全性。在正常情况下,MySQL 应该以一个非特权用户身份运行,而不是以 root 用户身份运行。
如果你想要以 root 用户身份运行 MySQL,请按照以下步骤操作:
1. 打开 MySQL 配置文件。在 CentOS 中,该文件通常位于 /etc/my.cnf 或 /etc/mysql/my.cnf。
2. 在 [mysqld] 部分添加以下行:
```
user=root
```
这将强制 MySQL 以 root 用户身份运行。
3. 保存并关闭配置文件。
4. 启动 MySQL 服务:
```
systemctl start mysqld
```
现在,MySQL 将以 root 用户身份运行。这可能会导致 MySQL 安全性问题,因此请谨慎操作。
相关问题
2023-06-05T11:56:56.075676Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root! 2023-06-05T11:56:56.075731Z 0 [ERROR] [MY-010119] [Server] Aborting
这是一个 MySQL 服务器的错误日志,提示无法以 root 用户身份运行 mysqld。这是因为以 root 用户身份运行 mysqld 会存在安全风险,所以 MySQL 官方文档中有一些建议的安全设置,建议你查看相关文档,遵循安全设置指南。如果你需要以 root 用户身份运行 mysqld,请确保你已经正确设置了相关的安全选项。
2023-06-08T02:25:37.583259Z 1 [Note] WSREP: GCache history reset: 00000000-0000-0000-0000-000000000000:0 -> c443b2d8-05a0-11ee-86b8-2e0fddf21737:0 2023-06-08T02:25:39.261528Z WSREP_SST: [INFO] Streaming with xbstream 2023-06-08T02:25:39.273174Z WSREP_SST: [INFO] WARNING: Stale temporary SST directory: /data/mysql//.sst from previous state transfer. Removing 2023-06-08T02:25:39.279749Z WSREP_SST: [INFO] Proceeding with SST......... 2023-06-08T02:25:39.519583Z 0 [Note] WSREP: (c05c7a4e, 'tcp://0.0.0.0:4567') turning message relay requesting off 2023-06-08T02:25:39.553817Z WSREP_SST: [INFO] ............Waiting for SST streaming to complete! 2023-06-08T02:25:49.257301Z WSREP_SST: [ERROR] ******************* FATAL ERROR ********************** 2023-06-08T02:25:49.260159Z WSREP_SST: [ERROR] xtrabackup_checkpoints missing. xtrabackup/SST failed on DONOR. Check DONOR log 2023-06-08T02:25:49.262811Z WSREP_SST: [ERROR] ****************************************************** 2023-06-08T02:25:49.266472Z WSREP_SST: [ERROR] Cleanup after exit with status:2 2023-06-08T02:25:49.289335Z 0 [Warning] WSREP: 1.0 (host78): State transfer to 0.0 (host79) failed: -22 (Invalid argument) 2023-06-08T02:25:49.289400Z 0 [ERROR] WSREP: gcs/src/gcs_group.cpp:gcs_group_handle_join_msg():811: Will never receive state. Need to abort. 2023-06-08T02:25:49.289465Z 0 [Note] WSREP: gcomm: terminating thread 2023-06-08T02:25:49.289494Z 0 [Note] WSREP: gcomm: joining thread 2023-06-08T02:25:49.289662Z 0 [Note] WSREP: gcomm: closing backend 2023-06-08T02:25:49.593055Z 0 [ERROR] WSREP: Process completed with error: wsrep_sst_xtrabackup-v2 --role 'joiner' --address '10.106.113.79' --datadir '/data/mysql/' --defaults-file '/etc/my.cnf' --defaults-group-suffix '' --parent '9996' --mysqld-version '5.7.41-44-57' '' : 2 (No such file or directory) 2023-06-08T02:25:49.593124Z 0 [ERROR] WSREP: Failed to read uuid:seqno from joiner script. 2023-06-08T02:25:49.593137Z 0 [ERROR] WSREP: SST script aborted with error 2 (No such file or directory) 2023-06-08T02:25:49.593186Z 0 [ERROR] WSREP: SST failed: 2 (No such file or directory) 2023-06-08T02:25:49.593234Z 0 [ERROR] Aborting 2023-06-08T02:25:49.593269Z 0 [Note] WSREP: Signalling cancellation of the SST request. 2023-06-08T02:25:49.593306Z 0 [Note] WSREP: SST request was cancelled 2023-06-08T02:25:49.593337Z 0 [Note] Giving 2 client threads a chance to die gracefully 2023-06-08T02:25:49.593357Z 1 [Note] WSREP: Closing send monitor... 2023-06-08T02:25:49.593370Z 1 [Note] WSREP: Closed send monitor. 2023-06-08T02:25:50.292465Z 0 [Note] WSREP: Current view of cluster as seen by this node
这段日志是一个 MySQL 集群中的一台机器(DONOR)在进行 SST(State Snapshot Transfer)时出现了错误。从日志中可以看到,xtrabackup_checkpoints 文件缺失导致 SST 失败,需要检查 DONOR 日志文件,以找到原因。因为 SST 失败,其他节点(joiner)无法接收状态,集群需要终止。最后,WSREP 进程由于遇到错误而退出。