我下载了 Windows 版 mysql-5.7.19。我获得了除 my-default.ini (配置文件)之外的所有预期文件夹和文件。下一步,系统要求我通过复制 my-default.ini 中的内容来创建 my.ini 文件,但在我的情况下缺少 my-default.ini。
最佳答案
如果您没有 ini
文件,那么您应该查找 .cnf
文件。如果您两者都没有,那么您可以选择use one of the examples here.
这是一个示例文件:
[client]
# Which port the client should use as a default.
# this means if you're connecting to the local machine, then you can omit
# the --port parameter
port=3306
[mysqld]
# Which port you're using. You'll need to write
# mysql --port=3360 if you're specifying the port
port=3306
# These two have to do with size of data allowed in the system
key_buffer_size=16M
max_allowed_packet=8M
[mysqldump]
# The style of mysqldump to use as default
quick
为了清楚起见,如果您将 [mysqld]
下的 port=3306
更改为 port=3307
,但不在[mysql]
那么您必须始终使用mysql --port=3307
。另一方面,如果将两者 port=3306
更改为 port=3307
,则可以省略端口参数。
关于mysql - MySQL 下载中缺少 my-default.ini,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45591412/