MySQL Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root
MySQL 大约 351 字说明
MySQL
不建议以root
用户启动。
解决
方法一
root
用户下启动时指定用户为mysql
。
mysqld --user=mysql --daemonize
方法二
因为mysql
用户是nologin
属性,所以启动时指定使用mysql
用户。
sudo -u mysql /usr/sbin/mysqld --daemonize --pid-file=/home/mysql/mysqld.pid
方法三
my.cnf
的mysqld
节点下添加user=mysql
。
[mysqld]
user=mysql
配置文件添加指定用户后,即可执行如下命令。
mysqld --daemonize
方法四(不建议)
启动时指定用户为root
。
mysqld --user=root --daemonize
阅读 3706 · 发布于 2021-03-13
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb扫描下方二维码关注公众号和小程序↓↓↓

昵称:
随便看看
换一批
-
Windows 命令中使用 WSL 命令阅读 89
-
使用 Telepresence 在本地环境直接访问 Kubernetes 内部服务地址阅读 625
-
skaffold init 提示 one or more valid Kubernetes manifests are required to run skaffold阅读 573
-
MongoDB 清理历史数据释放磁盘空间阅读 6467
-
Elasticsearch 后台启动阅读 1400
-
Windows10 访问网页提示找不到服务器 IP 地址阅读 10108
-
软考-系统架构设计师:人机界面设计阅读 2086
-
MySQL 性能分析之慢查询日志阅读 586
-
Go go build 命令阅读 2445
-
Vue v-once 组件只渲染一次阅读 183