To connect with MySQL server, client programs may be required to invoke connection options while making connection. However, the options can also be placed in file(s) as an alternative to specifying options on the command line. Such file(s) can be created besides MySQL standard option files (my.ini and my.cnf). The standard MySQL client programs look for option files at startup time and use any appropriate options they find there. Thus, –defaults-file, –defaults-extra-file and –no-defaults options are invoked while connecting with MySQL server to look for or ignore such options file(s). Take an example:

shell > mysql --defaults-file=C:\my-options

–defaults-file option is used to tell a program to read a single specific option file instead of the standard option files. For example, to use only the file C:\my-options for mysql and ignore the standard option files, you may use the program like this:

shell > mysql --defaults-file=C:\my-options

–defaults-extra-file is used to tell a program to read a single specific option file in addition to the standard option files.

–no-defaults option is used to tell a program to ignore all option files.

Posted in: MySQL

Related FAQ's

Marius Ion ANGEL HOT SOFT LLC (800) 316-7677