- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Using Options on the Command Line for MySQL programs?
Let us understand how to use options on command line for MySQL programs −
The program options which are specified on the command line follow the below rules −
The options are given after the command name.
An option argument begins with one dash or two dashes, and this depends on whether it is a short form or long form of the option name.
Many options have both short and long forms. Let us take an example to understand this − −? and −−help are the short and long forms of the option which instructs a MySQL program to display the help message.
The option names are case-sensitive. Both −v and −V are legal but have different meanings.
They are the respective short forms of the −−verbose and −−version options.
Some options take up a value following the option name. Let us take an example to understand this −
−h localhost or −−host=localhost show the MySQL server host to a client program.
The option value gives information to the program about the name of the host where the MySQL server is running.
The MySQL server contains some command options that can be specified only at startup, and a set of system variables, out of which some of them can be set at startup, at runtime, or both.
System variable names use underscores instead of dashes. When they are referenced at runtime, they must be written using underscores as shown below −
SET GLOBAL general_log = ON; SELECT @@GLOBAL.general_log;
During server startup, the syntax for system variables is the same as that of command options. Hence within variable names, dashes and underscores may be used interchangeably.
- Python Parser for command line options
- How to specify options for MySQL programs?
- Command Options for Connecting to the MySQL Server
- C-style parser for command line options in Python
- MySQL Command-Line Options that Affect Option-File Handling
- Connecting to the MySQL Server Using Command Options
- MySQL command line client for Windows?
- The MySQL Command-Line Client
- How to open MySQL command line on Windows10?
- Avoid placing password on command line with MySQL Utilities?
- What are the different MySQL prompts we have on the command line?
- How to create a database on command line in MySQL?
- What are some frequently used mysqlimport options while uploading the data into MySQL table through command line?
- Connecting to MySQL database from the command line?
- How to display the value of a variable on command line in MySQL?