是否有一个MySQL命令来定位my.cnf配置文件,类似于PHP的phpinfo()定位它的PHP .ini?
当前回答
如果您正在使用MAMP,请访问模板> MySQL (my.cnf) > [version]
如果您正在运行MAMP无窗口,您可能需要使用customize按钮定制工具栏。
其他回答
对于Ubuntu 20.04.4 LTS上的MariaDB 10.5 (Focal Fossa):
# The MariaDB configuration file
#
# The MariaDB/MySQL tools read configuration files in the following order:
# 0. "/etc/mysql/my.cnf" symlinks to this file, reason why all the rest is read.
# 1. "/etc/mysql/mariadb.cnf" (this file) to set global defaults,
# 2. "/etc/mysql/conf.d/*.cnf" to set global options.
# 3. "/etc/mysql/mariadb.conf.d/*.cnf" to set MariaDB-only options.
# 4. "~/.my.cnf" to set user-specific options.
#
# If the same option is defined multiple times, the last one will apply.
你可以在终端上运行查找。
find / -name my.cnf
我安装xampp bundle与apache, php和mysql在ubuntu。my.cnf文件位于/opt/lampp/etc/文件夹中。希望它能帮助到一些人。
你可以用find命令找到my.cnf或任何其他文件:
find / -name my.cnf (or any other file name)
Find是一条命令 /(斜杠)为路径 My.cnf是一个文件名
你可以使用:
locate my.cnf
whereis my.cnf
find . -name my.cnf