FAQs Categories
Client Server Commands
Database Structure
Table Types or Storage Engines
SQL Statements
Table Joins
Funtions and Operators
Tricky Select Queries
Speed Up Queries
Data Back Up
General Questions
1PLs Company - #1Payday.Loans Agency - Loans online and near me $100-$2500 (Same Day)
Powered by MySQL
Home / Client Server Commands / Question No: 79

What is difference among --defaults-file, --defaults-extra-file and --no-defaults?

I want to know the difference in some detail among --defaults-file, --defaults-extra-file and --no-defaults.

Answer No: 79

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-fileis 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.

Related MySQL FAQs to the Above FAQ

What-are-MySQL-client-programs What are MySQL client programs?

What-are-MySQL-non-client-utilities What are MySQL non-client utilities?

What-is-mysql-client-program-and-how-to-run-it What is mysql client program and how to run it?

How-to-connect-mysql-client-program-with-MySQL-Server-from-the-command-line How to connect mysql client program with MySQL Server from the command line?

What-is-difference-among-mysqld-mysqladmin-mysqldump-mysqlimport-and-mysqlcheck What is difference among mysqld, mysqladmin, mysqldump, mysqlimport and mysqlcheck?

How-to-check-version-of-the-running-MySQL-Server How to check version of the running MySQL Server?

What-is----compress-or--C What is --compress or -C?

What-is-difference-between-g-and-G-characters-in-mysql-client-program What is difference between \g and \G characters in mysql client program?

How-to-execute-statement(s)-directly-from-the-command-line How to execute statement(s) directly from the command line?

How-to-cancel-the-statement-in-mysql-client-program How to cancel the statement in mysql client program?

What-is-difference-between-Interactive-Mode-and-Batch-Mode-of-mysql-client What is difference between Interactive Mode and Batch Mode of mysql client?

How-to-run-SQL-script-files-in-mysql-client How to run SQL script files in mysql client?

How-to-execute-the-entire-script-file-regardless-of-errors-occurrence How to execute the entire script file regardless of errors occurrence?

What-does-STATUS-command-in-mysql-client What does STATUS command in mysql client?

How-to-know-MySQL-system-variables How to know MySQL system variables?

What-does-MySQL-use-its-port-by-default What does MySQL use its port by default?

What-does---safe-updates-option-in-mysql What does --safe-updates option in mysql?

What-is-sql-mode-in-MySQL-and-how-can-we-set-it What is sql mode in MySQL and how can we set it?

How-to-check-the-MySQL-running-mode How to check the MySQL running mode?

About FAQs: Recently Added FAQs

About MySQL FAQs: Site Map | Bookmark Us | Recommend this Site to Your Friend | Contact Us

Useful Links: | | | |

© 2023
All rights reserved.