Common MySQL command line tools

Source: Internet
Author: User

We are familiar with MySQL command lines. The following describes some commonly used MySQL command line tools. We hope you can learn more about MySQL command lines.

Some MySQL command line tools can be used for interaction. Each Command accepts some options. The long format of the options is to use two hyphens (-) as the prefix, such as mysql -- user = username, the short format is a single hyphen, such as mysql-uusername.

MySQL provides the following command line tools:

1) msql2mysql

Converts an application written in mSQL to MySQL.

2) myisamchk

Verify the integrity of the MyISAM table and fix the detected errors.

3) mysql

MySQL SQL interpreter. You can run the SQL statement here, ending with a semicolon or \ g.

4) mysql_upgrade

After the new version of MySQL is installed, you can use it to check whether it is compatible with the new version. This command should be run every time you update and upgrade MySQL.

5) mysqladmin

Mysql management interface program. Main tasks include:

(1) create databasename: create a specified database.

(2) drop databasename: delete a specified database.

(3) extended-status: provides extended status messages.

(4) flush-hosts: refreshes All cached hosts.

⑸ Flush-logs: refresh all logs.

Refreshing flush-status: refreshes all status variables.

Refreshing flush-tables: refreshes all tables.

Refreshing flush-threads: refreshes the thread buffer.

Revoke flush-privileges: forcibly Reload all authorization tables.

Terminate kill id [, id]: terminates the specified thread.

Reset password new_password: set a new password.

Ping: Verify that mysqld is running.

⒀ Processlist: displays activated MySQL threads. These threads can be terminated using the mysqladmin kill command.

Repeated reload: indicates the reload authorization table.

Refreshing refresh: refresh all tables, close all log files, and re-open them.

Shutdown: Shut down MySQL.

Running status: displays brief server status information.

⒅ Variables: outputs existing variables.

Minor version: displays the server version information.

6) mysqlaccess

Management of user interfaces can be seen as a shortcut to the SQL GRANT command.

7) mysqlcheck

Similar to myisamchk, a data integrity verification tool is primarily used when MySQL is running.

8) mysqld

MySQL server process. Instead of using it directly, use mysqld_safe instead.

9) mysqld_safe

Server Process Manager. It is used to start the mysqld server process and restart it when it crashes.

10) mysqldump

Dump the MySQL database status or database set to a text file to restore the database later.

11) mysqlimport

When importing a text file to a database, the file name must match the imported table.

12) mysqlshow

Displays the structure of a specified database object, such as a database, table, or column.

13) mysqlslap

A tool used to simulate the client load on the MySQL server.
 

Create a temporary table in php mysql

Quick table creation in mysql

MySQL chain table usage

Combination of multiple MySQL table result sets

Implementation of MySQL table sharding

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.