重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 7925|回复: 0
打印 上一主题 下一主题

[命令及语法] 解决Reading table information for completion of table and column names You ca...

[复制链接]
跳转到指定楼层
楼主
发表于 2020-9-4 11:03:13 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 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

Database changed

加载表和列名称完成的表信息
您可以关闭此功能,以获得更快的启动使用option:-A 就是不预读数据库的信息就ok了

出现问题的原因是::
我们进入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)


如果进程中有锁表的,比如id为4,则可以使用kill命令,结束它.
mysql> kill 4;

mysql> use information_schema
Database changed


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-29 04:38 , Processed in 0.086415 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表