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 <item>', where <item> 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 <item>', where <item> 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]
flush_option [, flush_option] ...