After you log in to the database, the following prompts are found when you select the database
mysql> Use test
Reading table information for completion of table and column names
Can turn off this feature to get a quicker startup with-a
Database changed
Mysql>
Read the table in this Library and table column information, the general reason is that when the table in the library, the data is very large, the execution of use < library name > After half a day did not respond, the connection is very slow, the solution is a-mode log in the database, will not read the library table information.
shell> mysql-h hostname-u username-p port-p-A
Enter Password:
(eg:shell> mysql-h 127.0.0.1-u root-p 3306-p-a)
Native login database, directly execute-A is also possible.
mysql> use test;
Reading table information for completion of table and column names
Can turn off this feature to get a quicker startup with-a
Database changed
Mysql> \q
Bye
[Email protected] ~]# mysql-u root-p-A
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 12
Server version:5.7.23 MySQL Community Server (GPL)
Copyright (c), 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
mysql> Use test
Database changed
Mysql>
In another case, you cannot switch access to the database and prompt for this information. (I have not met, put it together to understand the next)
Because the database in MySQL is too large, causing the read prefetch time to be too long to display this hint, if you have not encountered this problem before, then the cause of this problem may be due to change the database information operations, such as drop a large table (tens of millions of data) and terminated halfway.
Mysql> show Processlist; (View process)
The ID of the lock table is 16545618, you can use the KILL command to end it.
Mysql> kill 16545618;
If I delete these lock tables, my MySQL will be able to access them normally.
MySQL switch database prompt warning: Reading table information for completion of table and column names