运行 "mysqld --verbose --help" 命令列出mysqld 启动参数,找到类似如下的行,包含的是mysql配置文件的加载路径,可能有多个,修改第一个找到的(比如这里的 /etc/my.cnf)
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
用find 命令查找my* 的绝对路径,并修改 max_connections 参数