Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql configuration file sections

Tags:

mysql

I am trying to understand the different sections inside the my.ini configuration file ([client], [mysqld], [mysql]) and so on, I am looking for a guide describing each of the optional sections for the my.ini file, Also I was wondering what is the difference between init_connect and init-connect and I mean between the underscore(_) and the hyphen(-), Thank you all and have a nice day.

like image 642
Aviel Fedida Avatar asked Mar 16 '13 19:03

Aviel Fedida


People also ask

What is configuration file of MySQL?

Most MySQL programs can read startup options from option files (sometimes called configuration files). Option files provide a convenient way to specify commonly used options so that they need not be entered on the command line each time you run a program.


1 Answers

[mysql] applies to the mysql command line client - [mysql and client options]

[client] applies to all connecting clients (including mysql cli) - [mysql and client options]

[mysqld] applies to the mysql server - [server options]

[mysqldump] applies to the utility of the same name - [mysqldump options]

...etc

The difference between the (-) and the (_) is the context in which it is used.

(-) is used in command line parameters, where (_) is used in options file parameters.

You can see more in the docs: http://dev.mysql.com/doc/refman/5.5/en/option-files.html

like image 165
Evan Cordeiro Avatar answered Oct 11 '22 21:10

Evan Cordeiro