MySQL switch database prompt warning: Reading table information for completion of table and column names

Source: Internet
Author: User

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

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.