我在哪里可以找到 windows mysql 服务器的 my.ini 文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8404038/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 21:57:18  来源:igfitidea点击:

Where can I find the file my.ini file for windows mysql server?

mysqlreplicationmy.cnf

提问by gaurav

The same question is repeated again and again and i am another one repeating this question . I have already set up my mysql server . Its location is C:\Program Files\MySQL\MySQL Server 5.5 but i am not able to find the my.ini file inside the above path . When i type the command c:>mysql --help The output looks like

同样的问题一遍又一遍地重复,我是另一个重复这个问题的人。我已经设置了我的 mysql 服务器。它的位置是 C:\Program Files\MySQL\MySQL Server 5.5 但我无法在上述路径中找到 my.ini 文件。当我输入命令 c:>mysql --help 输出看起来像

Default options are read from the following files in the given order: C:\Windows\my.ini C:\Windows\my.cnf C:\my.ini C:\my.cnf C:\Program Files\MySQL\M ySQL Server 5.5\my.ini C:\Program Files\MySQL\MySQL Server 5.5\my.cnf The following groups are read: mysql client

默认选项按给定顺序从以下文件中读取: C:\Windows\my.ini C:\Windows\my.cnf C:\my.ini C:\my.cnf C:\Program Files\MySQL\M ySQL Server 5.5\my.ini C:\Program Files\MySQL\MySQL Server 5.5\my.cnf 读取以下组:mysql客户端

But when I opened the above locations from where it is reading these files ,I am unable to locate the file . Can anyone tell me what is the exact way to retireve the my.ini file for WINDOWS?

但是当我从读取这些文件的位置打开上述位置时,我无法找到该文件。谁能告诉我为 WINDOWS 停用 my.ini 文件的确切方法是什么?

采纳答案by Bala

To configure the client and utility applications, create a new my.ini file in the Windows installation directory. More info here

要配置客户端和实用程序应用程序,请在 Windows 安装目录中创建一个新的 my.ini 文件。更多信息在这里

回答by Iván Qui?ones

In MySQL 5.5 Windows the default path for my.ini is C:\ProgramData\MySQL\MySQL Server 5.5

在 MySQL 5.5 Windows 中,my.ini 的默认路径是 C:\ProgramData\MySQL\MySQL Server 5.5

You may need to change your file browser (windows explorer) options to show hidden files and directories.

您可能需要更改文件浏览器(Windows 资源管理器)选项以显示隐藏的文件和目录。

回答by Piotr Sobczyk

I just checked my installation and located my.iniat C:\Program Files\MySQL\MySQL Server 5.5 which seems to be exactly the same like your installation path (and mysql version is the same for us). Are you sure it isn't there?

我刚刚检查了我的安装并位于my.iniC:\Program Files\MySQL\MySQL Server 5.5 这似乎与您的安装路径完全相同(并且 mysql 版本对我们来说是相同的)。你确定它不在吗?

EDIT:

编辑:

Possibly all you have to do is to rename one of example .ini files to my.ini (and optionally tune it to your needs), see: http://dev.mysql.com/doc/refman/5.1/en/option-files.html#option-files-preconfigured. These are: my-small.cnf, my-medium.cnf, my-large.cnf, and my-huge.cnf in your mysql installation dir. It is possible that this is just what I did in my case - it was a while ago when I installed mysql.

可能您所要做的就是将示例 .ini 文件之一重命名为 my.ini(并可选择根据您的需要对其进行调整),请参阅:http: //dev.mysql.com/doc/refman/5.1/en/option -files.html#option-files-preconfigured。它们是:mysql 安装目录中的 my-small.cnf、my-medium.cnf、my-large.cnf 和 my-huge.cnf。这可能正是我在我的情况下所做的 - 不久前我安装了 mysql。

回答by Jose Manuel Gomez Alvarez

Check variable datadir, in my default setup of 5.7 on Windows 7 it used:

检查变量datadir,在我在 Windows 7 上使用的默认设置 5.7 中:

C:\ProgramData\MySQL\MySQL Server 5.7

回答by Chux18

Under the Data folder my friend. Go one dir up from Mysql 5.5

在我朋友的数据文件夹下。从 Mysql 5.5 上一级

回答by Vikram Gharge

You can check the my.ini through the below process: 1. Through the command prompt. Type command as "Services.msc". 2. Go to MySQL56 service and right Click. Select Properties. 3. In the Properties area you will get the my.ini file path at the end.

您可以通过以下过程检查 my.ini: 1. 通过命令提示符。键入命令为“Services.msc”。2. 进入 MySQL56 服务并右键单击。选择属性。3. 在“属性”区域,您将获得最后的 my.ini 文件路径。

回答by Nick Gotch

I found the my.inifile by running SHOW VARIABLES LIKE "%datadir%";and going one directory up.

my.ini通过运行SHOW VARIABLES LIKE "%datadir%";并向上一级目录找到了该文件。

回答by Kris

If you do not see my.ini file. Rename one of below file to my.ini

如果没有看到 my.ini 文件。将以下文件之一重命名为my.ini

  • my-huge.ini
  • my-large.ini
  • my-medium.ini
  • my-small.ini
  • 我的巨大的.ini
  • 我的大文件
  • 我的媒体.ini
  • 我的小文件