简体   繁体   English

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

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

The same question is repeated again and again and i am another one repeating this question . 同样的问题一再重复,我是另一个重复这个问题的人。 I have already set up my mysql server . 我已经设置了我的mysql服务器。 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 . 它的位置是C:\\ Program Files \\ MySQL \\ MySQL Server 5.5但我无法在上面的路径中找到my.ini文件。 When i type the command c:>mysql --help The output looks like 当我输入命令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 client

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文件的确切方法是什么?

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资源管理器)选项以显示隐藏的文件和目录。

To configure the client and utility applications, create a new my.ini file in the Windows installation directory. 要配置客户端和实用程序应用程序,请在Windows安装目录中创建新的my.ini文件。 More info here 更多信息在这里

Under the Data folder my friend. 在我的朋友Data文件夹下。 Go one dir up from Mysql 5.5 从Mysql 5.5中获取一个目录

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

C:\ProgramData\MySQL\MySQL Server 5.7

I just checked my installation and located my.ini at 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). 我刚刚检查了我的安装并将my.ini放在C:\\ Program Files \\ MySQL \\ MySQL Server 5.5上,它看起来与你的安装路径完全相同(而mysql版本对我们来说是一样的)。 Are you sure it isn't there? 你确定不存在吗?

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 . 您可能需要做的就是将一个示例.ini文件重命名为my.ini(并根据您的需要调整它),请参阅: 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. 这些是你的mysql安装目录中的my-small.cnf,my-medium.cnf,my-large.cnf和my-huge.cnf。 It is possible that this is just what I did in my case - it was a while ago when I installed mysql. 这可能就像我在我的情况下所做的那样 - 就在不久之前我安装了mysql。

If you do not see my.ini file. 如果您没有看到my.ini文件。 Rename one of below file to my.ini 将以下文件之一重命名为my.ini

  • my-huge.ini 我-huge.ini
  • my-large.ini 我-large.ini
  • my-medium.ini 我-medium.ini中
  • my-small.ini 我-small.ini

You can check the my.ini through the below process: 1. Through the command prompt. 您可以通过以下过程检查my.ini:1。通过命令提示符。 Type command as "Services.msc". 键入命令“Services.msc”。 2. Go to MySQL56 service and right Click. 2.转到MySQL56服务并右键单击。 Select Properties. 选择属性。 3. In the Properties area you will get the my.ini file path at the end. 3.在“属性”区域中,您将在结尾处获得my.ini文件路径。

I found the my.ini file by running SHOW VARIABLES LIKE "%datadir%"; 我通过运行SHOW VARIABLES LIKE "%datadir%";找到了my.ini文件SHOW VARIABLES LIKE "%datadir%"; and going one directory up. 然后去一个目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM