标题: 解决Reading table information for completion of table and column names You ca... [打印本页] 作者: jiawang 时间: 2020-9-4 11:03 标题: 解决Reading table information for completion of table and column names You ca... 本帖最后由 jiawang 于 2020-9-4 11:15 编辑
OS:centos7.8
db:MySQL8.11
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.04 sec)
mysql> use information_schema
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
出现问题的原因是::
我们进入mysql 时,没有使用-A参数;
即我们使用
mysql -hhostname -uusername -ppassword -Pport 的方式进入数据,
而没有使用
mysql -hhostname -uusername -ppassword -Pport -A的方式进入数据库。
解决方式一:
[mysql@strong bin]$ ./mysql -uroot -p -A
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use information_schema
Database changed
解决方式二:
先查看当前的进程情况,:
mysql> show processlist ;
+----+-----------------+-----------+--------------------+---------+------+------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-----------------+-----------+--------------------+---------+------+------------------------+------------------+
| 4 | event_scheduler | localhost | NULL | Daemon | 2186 | Waiting on empty queue | NULL |
| 9 | root | localhost | information_schema | Query | 0 | starting | show processlist |
+----+-----------------+-----------+--------------------+---------+------+------------------------+------------------+
2 rows in set (0.00 sec)