Search notes:

MySQL Server Instance configuration file

Default location

On Windows, the default location for the MySQL Server Instance configuration file is %ALLUSERSPROFILE%\MySQL\MySQL Server X.Y\my.ini.
On Linux, the file resides under /etc/my.cfg.

Sample content

[client]

port=3306
default-character-set   = utf8mb4


[mysql]

no-beep
default-character-set   = utf8mb4


[mysqld]

collation-server     = utf8mb4_0900_as_cs
init-connect         ='SET NAMES utf8mb4'
character-set-server = utf8mb4
skip-character-set-client-handshake

port=3306
datadir=C:/ProgramData/MySQL/MySQL Server 8.0/Data

local_infile         = on

default_authentication_plugin=caching_sha2_password

default-storage-engine=INNODB

sql-mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"

#
#  Trying to eliminate the stupid error message:
#    »The total number of locks exceeds the lock table size«
#
innodb_buffer_pool_size=512M

… etc etc

Specifying the file for mysqld

The file to be used when mysqld starts can be specified on the command line with the --defaults-file option.

Index