I do not think that the location matters rather it is a matter of personal preference, and the MySQL installer will automatically update the my.cnf file for you.
However I would rather go with D:\mysql as the installation directory because its lowercase, has no special characters (spaces, capital letters) and is not in the Program Files directory which you may need to clean out for a new install or upgrade.
You may also need to add the D:\mysql\bin directory to the PATH environment variable so that you can run the MySQL commands from any command prompt
wait_timeout
is a screwball one:
"On thread startup, the session wait_timeout value is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client (as defined by the CLIENT_INTERACTIVE connect option to mysql_real_connect()). See also interactive_timeout. "
max_connections
claims to have an upper bound of 100000, but I would say that even 10000 is unreasonably large. Does it work to put max_connections=1000
in my.cnf
?
You understand that you need to, after changing my.cnf,
- restart mysqld
- disconnect and reconnect to see the change
- use
SHOW GLOBAL
, not SHOW
, which defaults to SHOW SESSION
.
The interaction between GLOBAL
and SESSION
(for both VARIABLES
and STATUS
) varies with the setting. For many, not all things, session is initialized to global when you login. And wait_timeout
is probably the quirkiest.
Warning
If you had 100000 connections each running complex SELECTs
needing, say, 3 tmp tables, then you might need 100000 * 3 * 256M = 76.8TB of RAM to handle the tmp table! ( 256M = min(tmp_table_size, max_heap_table_size) ). This is a strong reason not to set all those things so high.
Best Answer
As your my.cnf is not on standard location, check
ps -ef | grep mysql
for--defaults-file
option.Below command will give you default file options:
mysqld --verbose --help | grep -A 1 "Default options"
(There are many similar questions previously answered.)