سؤال

I have MySQL 5.6 installed on Windows 7 64 Bit and I can't seem to get it to read my my.ini file. I've put the file into the base installation directory, the Windows directory and C:\, but it doesn't look like it's being read, even though all paths are listed here: http://dev.mysql.com/doc/refman/5.1/en/option-files.html

My my.ini file doesn't do much, I just took the my-default.ini as a base and added [mysqld] max_allowed_packet=100000000 because that default limit of 4MB is bad for BLOBs.

When I start mysql.exe and check the variable I find that it's still at 4MB, even after restarting the server (both via the services menu in the control panel and via mysqld -shutdown + mysqld -startup) and restarting Windows.

I have Windows 7, 64 bit. Can anyone help me, please?

Thanks in advance!

Alex

هل كانت مفيدة؟

المحلول

I faced the same issue. In my case service was using my.ini from another path (C:\ProgramData\MySQL\MySQL Server 5.6\my.ini). You can check it by examing the properties of MySQLServer service in services.msc.

نصائح أخرى

In MySQL Server 5.6 the my.ini location is under ProgramData "C:\ProgramData\MySQL\MySQL Server 5.6" not in the installation folder under programs files.

Be careful to what Kosmous says. don't add a new line and forget the old one and don't forget to restart the service.

I got the same exact problem and the solution you posted from the other thread was kinda convoluted and it wasn't really solving the actual issue. I'm sure you did the same thing as me and added max_allowed_packet = 32M or whatever right under [mysqld] like every site says. Although this is perfectly correct, people forgot to mention and it took me a week to finally realize that there was already a default max_allowed_packet = 4M in the default my.ini file. I totally didn't notice this because each line of [mysqld] is so heavily commented. Obviously, since the original max_allowed_packet = 4M was like 2 pages down from [mysqld] header, it overrode any setting you manually inserted.

I started another thread at the MySQL forums and a patient user was able to help me out:

http://forums.mysql.com/read.php?10,595697,595697#msg-595697

It's not the most satisfying solution because it essentially means reinstalling the server manually whenever you want to change something in the my.ini file, but at least it works somehow.

Sharing my findings after lot of wasted time. I should always remember to read the manual first This is right out of the manual. In my case the my.ini file was under C:\ProgramData\MySQL

[1]: https://i.stack.imgur.com/LIdVr.png

More information can be found below https://dev.mysql.com/doc/refman/5.7/en/option-files.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top