On Linux, it's typically located at /etc/mysql/my.cnf or /etc/my.cnf.
On Windows, it's typically located at C:\ProgramData\MySQL\MySQL Server X.X\my.ini or in the MySQL installation directory.
If it doesn't exist, you can create one
Navigate to the MySQL installation directory. e.g. C:\Users\msun\mysql-8.0.30-winx64.
Create a new file named my.ini in this directory.
Locate the MySQL Configuration File:
On Linux, it's typically located at /etc/mysql/my.cnf or /etc/my.cnf. On Windows, it's typically located at C:\ProgramData\MySQL\MySQL Server X.X\my.ini or in the MySQL installation directory.
If it doesn't exist, you can create one
Navigate to the MySQL installation directory. e.g. C:\Users\msun\mysql-8.0.30-winx64. Create a new file named my.ini in this directory.
To start the server with the configuration file
SHOW VARIABLES LIKE 'collation_server';