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

9

9

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

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

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?

Tratner answered 6/12, 2011 at 17:20 Comment(1)
sorry for my bad formatting and englishTratner
A
7

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

Aweather answered 6/12, 2011 at 17:37 Comment(3)
Great Boss thanks for the solution ,i din't find the solution anywhereTratner
And renaming one of predefined config files, for example my-small.ini to my.ini is even simplier.Personalism
Have a look at your Service entry for where MySQL is pointing to the my.ini file and you may be surprised! I found mine in C:\ProgramData\MySQL\MySQL Server 5.6Bring
P
14

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

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

Phototube answered 19/1, 2013 at 0:29 Comment(2)
You may execute the SQL query SHOW VARIABLES on the database to see, whether the values of your INI file actually were read in successfully.Radke
Good answer, because it says where the configuration file is placed initially instead where it should be placed.Francklin
A
7

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

Aweather answered 6/12, 2011 at 17:37 Comment(3)
Great Boss thanks for the solution ,i din't find the solution anywhereTratner
And renaming one of predefined config files, for example my-small.ini to my.ini is even simplier.Personalism
Have a look at your Service entry for where MySQL is pointing to the my.ini file and you may be surprised! I found mine in C:\ProgramData\MySQL\MySQL Server 5.6Bring
P
1

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). 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 . 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.

Personalism answered 6/12, 2011 at 17:32 Comment(2)
:Yes i am sure ,so many people have asked the same question regarding this ,they are also not able to locate the my.ini fileTratner
@Tratner These are just example versions of my.ini. Renaming one of them to my.ini is even simplier than creating new my.ini file from scratch like Balamurugan K suggested.Personalism
U
1

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

Up answered 7/1, 2013 at 8:15 Comment(0)
K
1

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

C:\ProgramData\MySQL\MySQL Server 5.7
Kenwood answered 25/9, 2016 at 15:3 Comment(0)
T
0

Just visit: http://opensourcedba.wordpress.com/2011/01/12/mysql-basics-part-3-%E2%80%93-your-my-cnf-or-my-ini-file/?blogsub=confirming

This has the whole content required for my.ini.

Thunderbolt answered 5/6, 2012 at 10:2 Comment(0)
R
0

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

  • my-huge.ini
  • my-large.ini
  • my-medium.ini
  • my-small.ini
Renteria answered 7/12, 2015 at 1:21 Comment(1)
What about my-default.ini?Arlaarlan
C
0

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.

Catlee answered 25/9, 2018 at 10:39 Comment(0)
C
0

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

Citarella answered 28/11, 2018 at 15:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.