MYSQL Quick Start: MYSQL command line instructions

Source: Internet
Author: User
Tags mysql commands rehash mysql command line

MYSQL Quick Start: MYSQL command line instructions http://www.bkjia.com/database/201212/173868.htmlMYSQL Entry 2: Search Using Regular Expressions http://www.bkjia.com/database/201212/173869.htmlMYSQL Entry 3: Full Text Search http://www.bkjia.com/database/201212/173873.htmlMYSQL Entry 4: MYSQL Data Types http://www.bkjia.com/database/201212/175536.htmlMYSQL Entry 5: MYSQL Character Set http://www.bkjia.com/database/201212/175541.htmlMYSQL Getting started 6: MYSQL Operators http://www.bkjia.com/database/201212/175862.htmlMYSQL Entry 7: MYSQL common functions http://www.bkjia.com/database/201212/175864.htmlMYSQL Step 8: basic database and table operations http://www.bkjia.com/database/201212/175867.htmlMYSQL 9: simple indexing operations http://www.bkjia.com/database/201212/176772.htmlMYSQL 10: basic view operations http://www.bkjia.com/database/201212/176775.htmlMYSQL Quick Start 11: Basic trigger operations http://www.bkjia.com/database/201212/176781.htmlMYSQL 12: basic operations of Stored Procedures http://www.bkjia.com/database/201212/177380.htmlMYSQL Step 13: basic operations for custom functions http://www.bkjia.com/database/201212/177382.htmlMYSQL 14: basic operations on cursors http://www.bkjia.com/database/201212/177384.htmlMYSQL Step 15: basic transaction processing operations http://www.bkjia.com/database/201212/177385.htmlMYSQL Tutorial 16: MYSQL Command Parameters http://www.bkjia.com/database/201212/178079.html In the MYSQL command line, some very practical small commands can be used. After running the MYSQL command line, enter \ h to view the small commands supported by the MYSQL command line and the corresponding function description: [SQL] www.2cto.com mysql> \ h For information about MySQL products and services, visit: http://www.mysql.com/ For developer information, including the MySQL Reference Manual, visit: http://dev.mysql.com/ To buy MySQL Network Support, training, or other products, visit: https://shop.mysql.com/ List of all MySQL commands: Note that all text commands must be first on line and end ';'? (\?) Synonym for 'help '. clear (\ c) Clear command. connect (\ r) Reconnect to the server. optional arguments are db and host. delimiter (\ d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter. ego (\ G) Send command to mysql server, display result vertically. exit (\ q) Exit mysql. same as quit. go (\ g) Send command to mysql server. help (\ h) Display this help. notee (\ t) Don't wri Te into outfile. print (\ p) Print current command. prompt (\ R) Change your mysql prompt. quit (\ q) Quit mysql. rehash (#) Rebuild completion hash. source (\.) execute an SQL script file. takes a file name as an argument. status (\ s) Get status information from the server. tee (\ T) Set outfile [to_outfile]. append everything into given outfile. use (\ u) Use another database. takes database name Argument. charset (\ C) Switch to another charset. might be needed for processing binlog with multi-byte charsets. warnings (\ W) Show warnings after every statement. nowarning (\ w) Don't show warnings after every statement. for server side help, type 'help CONTENTS' the output mainly contains two parts: The first part is the MYSQL client-related small commands. The corresponding Chinese translation is as follows :? (\?) Displays help information. Similar to \ h, clear (\ c) does not execute the Command currently being input. If the command separator is included before \ c, the part before the command separator is still executed. Connect (\ r) to the server again. The command has two parameters: Database Name and server host name. The host name can be omitted. Delimiter (\ d) modifies the command separator ego (\ G) to vertically display the command result exit (\ q) exit go (\ g) and send the command to the server. It can be used at the end of the statement to replace the command separator. Help (\ h) displays help information. And \? Do not write OUTFILEprint (\ p) to notee (\ t) to display the currently executed command prompt (\ R) to modify the MYSQL prompt quit (\ q) and exit rehash (\#) source (\.) run the SQL Script status (\ s) in the parameter file to obtain the server status tee (\ T) and specify an output file, log all operations and results in the command line to this file. use (\ u) converts the currently used database charset (\ C) to the character set warnings (\ W) of the current connection and client) nowarning (\ w): [SQL] mysql> select count (*) from newname \ c mysql> select count (*) from newname; \ c + ---------- + | count (*) | + ---------- + | 159 | + ---------- + mysql> \ R this is mysql5> PROMPT set to 'this is mysql5> 'this is mysql5> \. h: \ select. SQL + ---------- + | count (*) | + ---------- + | 159 | + ---------- + this is mysql5> \ s ------------ mysql Ver 14.14 Distrib 5.1.28-rc, for Win32 (ia32) connection id: 25 Current database: test Current user: root @ localhost SSL: Not in use Using delimiter:; Server version: 5.1.28-rc-community My SQL Community Server (GPL) Protocol version: 10 Connection: localhost via TCP/IP Server characterset: latin1 Db characterset: latin1 Client characterset: gbk Conn. characterset: gbk TCP port: 3306 Uptime: 1 hour 29 min 31 sec Threads: 1 Questions: 55 Slow queries: 0 Opens: 24 Flush tables: 1 Open tables: 5 Queries per second avg: 0.10 -------------- this is mysql5> \ T h: \ a.txt Logging to file 'H :\ A.txt 'this is mysql5> \ q Bye the second part is the command for viewing MYSQL Server-related information. You can use help contents to view its usage: [SQL] mysql> help contents You asked for help about help category: "Contents" For more information, type 'help <item> ', where <item> is one of the following categories: Account Management Administration Data Definition Data Manipulation Data Types Functions and Modifiers for Use with group by Geographic Features Language Structure Plugins Storage Engines Stored Routines Table Maintenance Transactions Triggers can still be used to view the results of some help commands. For example, the result of help Data Types is as follows: [SQL] mysql> help Data Types You asked For help about help category: "Data Types" for more information, type 'help <item> ', where <item> is one of the following topics: optional BIGINT BINARY BIT BLOB DATA TYPE BOOLEAN CHAR BYTE DATE DATETIME DEC DECIMAL DOUBLE PRECISION ENUM FLOAT INT INTEGER LONGBLOB LONGTEXT MEDIUMBLOB MEDIUMINT MEDIUMTEXT SET DATA TYPE SMALLINT TEXT TIME TIMESTAMP TINYBLOB TINYINT TINYTEXT VARBINARY VARCHAR year data type can still use help INT, view the INT Data Type Details: [SQL] mysql> help INT Name: 'int' Description: INT [(M)] [UNSIGNED] [ZEROFILL] A normal-size integer. the signed range is-2147483648 to 2147483647. the unsigned range is 0 to 4294967295. URL: http://dev.mysql.com/ Doc/refman/5.1/en/numeric-type-overview.html by result can view INT type usage, and INT data type can represent the data range.

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.