执行 mysql 时未应用 my.cnf 中的 mysqld 设置

执行 mysql 时未应用 my.cnf 中的 mysqld 设置

mysql[mysqld]忽略in下的设置,它会选择和 的my.cnf设置。[client][mysql]

我该如何解决?

我尝试过brew services mysql restart,但没有什么区别。

我的.cnf:

 λ cat /opt/homebrew/etc/my.cnf
# Default Homebrew MySQL server config
[client]
user = <user>
host = <hostname>
port = 3306

[mysql]
auto-rehash

[mysqld]
wait_timeout = 28800
interactive_timeout =  28800
net_read_timeout =  28800
connect_timeout =  28800
net_write_timeout =  28800

输出mysqld --verbose --help | grep -i 'timeout'

connect-timeout                                              28800000
delayed-insert-timeout                                       300
innodb-flush-log-at-timeout                                  1
innodb-lock-wait-timeout                                     50
innodb-rollback-on-timeout                                   FALSE
interactive-timeout                                          28800000
lock-wait-timeout                                            31536000
mysqlx-connect-timeout                                       28800000
mysqlx-idle-worker-thread-timeout                            3600
mysqlx-interactive-timeout                                   2147483
mysqlx-port-open-timeout                                     0
mysqlx-read-timeout                                          2147483
mysqlx-wait-timeout                                          2147483
mysqlx-write-timeout                                         2147483
net-read-timeout                                             28800000
net-write-timeout                                            28800000
port-open-timeout                                            0
replica-net-timeout                                          60
rpl-stop-replica-timeout                                     31536000
rpl-stop-slave-timeout                                       31536000
slave-net-timeout                                            60
ssl-session-cache-timeout                                    300
wait-timeout                                                 28800000

服务器上的较低,但为什么不会datagripp失去连接?我什至改变了这些变量,但没有效果。

答案1

跑步:

mysqld --verbose --help

您将看到两行,例如:

Default options are read from the following files in the given order:
/opt/homebrew/etc/my.cnf ~/.my.cnf

检查列出的文件中是否没有覆盖。

相关内容