mysql切换数据库提示警告:Reading table information for completion of table and column names
登录数据库后,选择数据库时发现以下提示,
mysql> use test
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
mysql>
意思是 预读这个库中表以及表列信息,一般原因是当库中表很多,表中数据很大时,就会出现执行use <库名>后半天没反应,连接很慢的情况,解决办法就是 -A 方式登录数据库,不会预读库中表信息。
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)
本机登录数据库,直接执行-A也是可以的。
mysql> use test;
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
mysql> \q
Bye
[root@localhost ~]# 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) 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 test
Database changed
mysql>
另一种情况,无法切换访问数据库,提示此信息。(我没遇到过,一并贴过来了解下)
由于MYSQL中数据库太大,导致读取预读时间太长,从而显示这个提示,如果之前都没有遇到这个问题,那么产生这个问题的原因可能是由于有改变数据库信息的操作,比如drop一个很大的表(几千万数据)而中途终止.
mysql> show processlist ; (查看进程)

上图中锁表的id为16545618,则可以使用kill命令,结束它.
mysql> kill 16545618;
删除这些锁表的情况,我的mysql就能正常访问了。
mysql切换数据库提示警告:Reading table information for completion of table and column names的更多相关文章
- MySQL Reading table information for completion of table and column names
打开数据库是发现提示: mysql> show databases; +--------------------+ | Database | +--------------------+ | b ...
- msyql error: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
mysql> use mydb Reading table information for completion of table and column names You can turn o ...
- Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -
mysql -A不预读数据库信息(use dbname 更快)—Reading table information for completion of table and column names Y ...
- 解决:Reading table information for completion of table and column names
mysql -A不预读数据库信息(use dbname 更快)—Reading table information for completion of table and column names Y ...
- Reading table information for completion of table and column names
mysql> use ad_detail_page;Reading table information for completion of table and column namesYou c ...
- Mysql中use一个表出现警告:Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
今天使用mysql登录数据库,use一个表的时候出现警告信息,详细如下: 后来上网查了一下,出现问题的原因是: 进入mysql时,没有使用 -A 参数 平时我们习惯使用:mysql -hhostn ...
- mysql导出数据库提示警告在GTID模式下面
[root@db02 tmp]# mysqldump -S /tmp/mysql.sock -A -R --triggers --master-data=2 --single-transaction ...
- Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
问题: 当我们打开数据库,即use dbname时,要预读数据库信息,当使用-A参数时,就不预读数据库信息. 解决方法:mysql -hhostname -uusername -ppassword - ...
- mysql 切换数据库方案
业务场景 在SAAS模式下,不同的租户需要切换数据库,我们可以使用动态数据源,动态数据源有个问题,就是需要对每一个数据库创建一个连接池,在初始化的时候初始化这些连接池, 如果多台应用服务器的情况,每一 ...
随机推荐
- 华东交通大学2017年ACM“双基”程序设计竞赛 1002
Problem Description 一天YZW参加了学校组织交际舞活动,活动的开始活动方分别给男生和女生从1-n进行编号,按照从小到大顺时针的方式进行男女搭档分配,相同编号的男女组合成一对,例如一 ...
- maven参数
mvn clean package -DskipTests mvn -T 2 clean install/mvn -T 2C clean install: maven支持并行构建,-T 2表示使用2个 ...
- 插入po得到主键,插入sql得到主键
import com.yd.common.data.CIPPageInfo; import com.yd.common.data.CIPReqCondition; import com.yd.comm ...
- Python+Selenium----使用HTMLTestRunner.py生成自动化测试报告1(使用IDLE)
1.说明 自动化测试报告是一个很重要的测试数据,网上看了一下,使用HTMLTestRunner.py生成自动化测试报告使用的比较多,但是呢,小白刚刚入手,不太懂,看了很多博客,终于生成了一个测试报告, ...
- (转)深入浅出linux系统umask值及其对应的文件权限讲解
浅出linux系统umask值及其对应的文件权限讲解 原文:http://blog.51cto.com/oldboy/1060032 缘起:1.此文的撰写特别为感谢51cto的博客工作人员和领导,老男 ...
- BIO,NIO,AIO的理解
BIO:同步阻塞式IO,服务器实现模式为一个连接一个线程,即客户端有连接请求时服务器端就需要启动一个线程进行处理,如果这个连接不做任何事情会造成不必要的线程开销,当然可以通过线程池机制改善. NIO: ...
- MySQL学习系列2--MySQL执行计划分析EXPLAIN [原创]
1.Explain语法 EXPLAIN SELECT …… 变体: EXPLAIN EXTENDED SELECT …… 将执行计划“反编译”成SELECT语句,运行SHOW WARNINGS 可 ...
- <script>, <script async>, <script defer> 三种标签的区别
<script>, <script async>, <script defer> 三种标签的区别 <script>标签 阻塞html parsing 脚 ...
- 几幅手稿讲解CNN
学习深度神经网络方面的算法已经有一段时间了,对目前比较经典的模型也有了一些了解.这种曾经一度低迷的方法现在已经吸引了很多领域的目光,在几年前仅仅存在于研究者想象中的应用,近几年也相继被深度学习方法实现 ...
- jQuery_2_常规选择器-简单选择器
JQuery最核心的组成部分就是:选择器引擎.它继承了css的语法,可以对DOM元素的标签名.属性名.状态等进行快速准确的选择. jQuery选择器的写法与CSS 选择器十分类似,只不过他们的功能不同 ...