如何获取MySQL帮助信息(四)

2014-11-24 17:13:38 · 作者: · 浏览: 3
er (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: utf8
Client characterset: gbk ---客户端和conn端字符集都变成gbk了。
Conn. characterset: gbk
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 3 hours 13 min 33 sec


Threads: 1 Questions: 105 Slow queries: 0 Opens: 313 Flush tables: 1 Open tables: 51 Queries per second avg: 0.009
--------------


mysql> warnings;
Show warnings enabled.
mysql> selecs 1;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'selecs 1' at line 1
mysql> show warnings;
+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Error | 1064 | You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'selecs 1' at line 1 |
+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)


mysql> show errors;
+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Error | 1064 | You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'selecs 1' at line 1 |
+-------+------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)


mysql> nowarning;
Show warnings disabled.


3、服务端的相关帮助


--获取服务器管理相关的帮助,输入help contents
mysql> help contents;
You asked for help about help category: "Contents"
For more information, type 'help ', where is one of the following
categories:
Account Management
Administration
Compound Statements
Data Definition
Data Manipulation
Data Types
Functions
Functions and Modifiers for Use with GROUP BY
Geographic Features
Help Metadata
Language Structure
Plugins
Procedures
Storage Engines
Table Maintenance
Transactions
User-Defined Functions
Utility


--要查询那一个部分的内容,直接输入help + 内容,如下
mysql> help administration;
You asked for help about help category: "Administration"
For more information, type 'help ', where is one of the following
topics:
BINLOG
CACHE INDEX
FLUSH
FLUSH QUERY CACHE
HELP COMMAND
KILL
..........


--接下来,我们查看administration部分下的flush命令用法,直接输入help flush;即可
mysql> help flush;
Name: 'FLUSH'
Description:
Syntax:
FLUSH [NO_WRITE_TO_BINLOG | LOCAL]
fl