You should know 10 MySQL client startup options

Source: Internet
Author: User
Tags mysql client mysql query sql injection time interval mysql database

Most server administrators know that the MySQL database management system (RDBMS) is a highly flexible software block with a wide range of startup options that can be used to modify related behavior. However, most people are not aware that standard MySQL clients have an equal amount of startup options, some of which are extremely useful in day-to-day MySQL interactions. These options are not "secret" in themselves, and many of them are not used, and even some of them can be handled in a process that is remarkably beneficial to server interaction.

Table A is some of the less well-known MySQL client startup options. Each entry in the table explains the functionality and usage of each option. This will give you some ideas about the scope and depth of MySQL applications, and help you complete your daily application development.

Table A

Options

Function

When to use

Compression

This option compresses upstream and downstream packet delivery between customers and servers, assuming that the compression is supported on both sides of the connection.

Use this option to improve performance when communication bandwidth is limited-for example, by a slow network connection

Debugging

This option forces MySQL to write debug data to a specified log file, including startup and shutdown as well as process processing. You can use the other debugging information options in conjunction with --debug-info

Use this option to obtain detailed diagnostic information for MySQL when working with an experienced server or customer.

Forced

This option forces MySQL to continue processing SQL commands even when errors occur.

Use this option in an automated installation/solution Installer-for example, when you try to add a mass injection record to a database as part of a program installation, and you do not want to copy an entry to break the process

Pager

This option exports MySQL query output to an external "pager" program, such as cat, less or more

Use this option when your query returns a large result setting, and you want to flip through the screen interactively

Xml

This option formats your MySQL query results as well-formed XML

When you want the query to output the package in a standard format, it is usually a prelude to a third-party program

Single-Database

In addition to the options associated with database naming, this option tells the MySQL customer to ignore all commands

Use this option to disclose actions from SQL injection files on a single database, or to skip a database update.

Letter T

This option allows you to record all query output logs in an external file

Use this option when you need a transaction record, or for future reference, or to keep the audit index

--wait

Wait

Typically, the MySQL client automatically interrupts if the server cannot be connected. This option forces it to wait for the defined time interval and then try again.

Use ' option ' to ' cut down ' keystrokes when attempting to contact a remote or non-responsive MySQL server.

Use this option to disconnect a key when attempting to connect to a remote or unresponsive MySQL server

Security update

This option tells MySQL to ignore all unqualified DML commands-that is, the command does not contain filtering criteria, such as WHERE, LIMIT or having clauses. This provides a secure network that prevents accidental modification or deletion of an entire table or database.

When you use this option to automatically protect yourself against dangerous queries, these queries can cause widespread data corruption or loss

--prompt

Tips

This option allows you to change the standard mysql> command prompt, using various undefined formats.

Use this option to make your MySQL print useful navigation or temporary information-for example, current date or time, server statistics and mud at the database/list level position

You can read more relevant (and other options) content.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.