When user dbname is used, the speed is slow and the following message is displayed:
Mysql> use dbname
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with-
Then it is stuck here.
The reason is that when we open the database, that is, use dbname, We need to pre-read the database information. Because the database is too large, that is, there are a lot of tables in the database, so if you read the database information in advance, it will be very slow, so it gets stuck. If there are very few tables in the database, there will be no problems.
Solution: mysql prompts:
When we enter mysql, the-A parameter is not used:
Mysql> mysql-hhostname-uusername-ppassword-Pport
When the-A parameter is used, the database information is not pre-read, and the speed is faster:
Mysql> mysql-hhostname-uusername-ppassword-Pport-