• rehash , \# 

Rebuild the completion hash that enables database, table, and column name completion while you are entering statements. (See the description for the --auto-rehash  option.) 

• resetconnection , \x 

Reset the connection to clear the session state. This includes clearing any current query attributes defined using the query_attributes  command. 

Resetting a connection has effects similar to mysql_change_user()  or an auto-reconnect except that the connection is not closed and reopened, and re-authentication is not done. See mysql_change_user(), and Automatic Reconnection Control. 

This example shows how resetconnection  clears a value maintained in the session state: 

mysql> SELECT LAST_INSERT_ID(3); +-------------------+ | LAST_INSERT_ID(3) | +-------------------+ | 3 | +-------------------+ mysql> SELECT LAST_INSERT_ID(); +------------------+ | LAST_INSERT_ID() | +------------------+ | 3 | +------------------+ mysql> resetconnection; mysql> SELECT LAST_INSERT_ID(); +------------------+ | LAST_INSERT_ID() | +------------------+ | 0 | +------------------+ 

• source file_name , \. file_name 

Read the named file and executes the statements contained therein. On Windows, specify path name separators as /  or \\ . 

Quote characters are taken as part of the file name itself. For best results, the name should not include space characters. 

• status , \s 

Provide status information about the connection and the server you are using. If you are running with -- safe-updates  enabled, status  also prints the values for the mysql  variables that affect your queries. 

• system command , \! command 

Execute the given command using your default command interpreter. 

Prior to MySQL 8.0.19, the system  command works only in Unix. As of 8.0.19, it also works on Windows. 

