Some standard my.cnf variants can be found at /Applications/MAMP/Library/support-files/
Invoking mysqld --verbose --help | less on the MAMP mysqld binary reports:
Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /Applications/MAMP/conf/my.cnf ~/.my.cnf
Copy one of the variants in /Applications/MAMP/Library/support-files/ to one of the locations in mysqld's search order above, and you should be good to go after restarting the daemon.
I found that MAMP PRO will create a my.cnf by default on startup under the MAMP/tmp directory if a ~/my.cnf is not provided ... grepping ps aux you may find the default location under /Applications/MAMP/tmp/my.cnf ...
发布评论
评论(6)
MAMP(非 PRO)的 MySQL 服务器将在没有任何 my.cnf 文件的情况下启动。 但您可以创建自己的 my.cnf 文件。
/Applications/MAMP/conf/
中创建my.cnf
文件my.cnf
my .cnf
您不必将完整的配置放入 my.cnf 文件中。 您可以只添加部分配置...例如:
The MySQL server of MAMP (not PRO) will be started without any my.cnf file. But you can create your own my.cnf file.
my.cnf
file in/Applications/MAMP/conf/
my.cnf
my.cnf
You do not have to put a complete configuration in the my.cnf file. You can just add parts of a configuration ... for example:
找到
一些标准的 my.cnf 变体可以在 /Applications/MAMP/Library/support-files/中 MAMP mysqld 二进制报告上的 less:
将 /Applications/MAMP/Library/support-files/ 中的变体之一复制到以下之一上面 mysqld 搜索顺序中的位置,重新启动守护进程后应该就可以了。
Some standard my.cnf variants can be found at /Applications/MAMP/Library/support-files/
Invoking
mysqld --verbose --help | less
on the MAMP mysqld binary reports:Copy one of the variants in /Applications/MAMP/Library/support-files/ to one of the locations in mysqld's search order above, and you should be good to go after restarting the daemon.
由于 MAMP 服务器在 MAMP 服务器启动时动态生成
my.cnf
,因此最好使用以下步骤添加或编辑 MySQL 配置:我在 MAMP PRO 3.5 上尝试过此操作。
Since MAMP server generates
my.cnf
dynamically on MAMP server startup, it's best to use the following steps to add or edit the MySQL configuration:I tried this on MAMP PRO 3.5.
对于 Mac El Capitan 上的 MAMP 3.5,只有这个对我有用:
/Applications/MAMP/Library/
中创建一个my.cnf
文件添加您的内容进入
my.cnf
就像<代码>[mysqld]
max_allowed_packet = 64M
保存
my.cnf
不需要更改文件的所有权,它应该可以工作。 通过在 phpmyadmin 中运行
SHOW VARIABLES
进行验证并查找更改的设置。For MAMP 3.5 on Mac El Capitan, only this worked for me:
my.cnf
file in/Applications/MAMP/Library/
Add your content into
my.cnf
like[mysqld]
max_allowed_packet = 64M
Save
my.cnf
Not required to change ownership of file, it should work. Verify by running
SHOW VARIABLES
in phpmyadmin and look for your changed setting.不,它不附带 my.cnf 文件
No, it doesn't come with the my.cnf file
我发现如果未提供 ~/my.cnf,MAMP PRO 将在启动时默认在 MAMP/tmp 目录下创建 my.cnf ... grep ps aux 您可能会在 /Applications/MAMP/tmp 下找到默认位置/my.cnf ...
其中提供了以下内容...
I found that MAMP PRO will create a my.cnf by default on startup under the MAMP/tmp directory if a ~/my.cnf is not provided ... grepping ps aux you may find the default location under /Applications/MAMP/tmp/my.cnf ...
Which provided the following...