登录数据库后,选择数据库时发现以下提示,

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的更多相关文章

  1. MySQL Reading table information for completion of table and column names

    打开数据库是发现提示: mysql> show databases; +--------------------+ | Database | +--------------------+ | b ...

  2. 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 ...

  3. 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 ...

  4. 解决: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 ...

  5. 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 ...

  6. 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 ...

  7. mysql导出数据库提示警告在GTID模式下面

    [root@db02 tmp]# mysqldump -S /tmp/mysql.sock -A -R --triggers --master-data=2 --single-transaction ...

  8. 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 - ...

  9. mysql 切换数据库方案

    业务场景 在SAAS模式下,不同的租户需要切换数据库,我们可以使用动态数据源,动态数据源有个问题,就是需要对每一个数据库创建一个连接池,在初始化的时候初始化这些连接池, 如果多台应用服务器的情况,每一 ...

随机推荐

  1. Java面向对象_单例设计模式

    单例设计模式:保证一个类仅有一个实例,并提供一个访问它的全局访问点 1.构造方法私有化 2.声明一个本类对象 3.给外部提供一个静态方法获取对象实例 两种实现方式:饿汉式和懒汉式 何种情况下使用呢?当 ...

  2. ruby firefox23报错:waiting for evaluate.js load failed

    解决方法 gem install selenium-webdriver -v='2.34.0'

  3. Xcode Ghost

    Xcode Ghost,是一种手机病毒,主要通过非官方下载的 Xcode 传播,能够在开发过程中通过 CoreService 库文件进行感染,使编译出的 App 被注入第三方的代码,向指定网站上传用户 ...

  4. java 基础 03 运算符 分支结构 循环结构

    今天内容: (1)运算符 (2)分支结构 (3)循环结构 1运算符 1.1赋值运算符 (1)简单赋值 = 表示赋值运算符,用于将=右边的数据赋值给=左边的变量来覆盖原来的数值. 笔试题: ia == ...

  5. pandas:数据分析

    一.介绍 pandas是一个强大的Python数据分析的工具包,是基于NumPy构建的. 1.主要功能 具备对其功能的数据结构DataFrame.Series 集成时间序列功能 提供丰富的数学运算和操 ...

  6. 表格<table>

    <table> <tr> <th>表头1</th> <th>表头2</th> <th>表头3</th> ...

  7. nsight 中出现method could not be resolved 报错

    解决的方法就是现在编译选项中取消该报错. 项目右键->属性->c/c++常规->Code Analysis,选择"Use project settings"  中 ...

  8. Alembic基本使用

    1.alembic init YOUR_ALEMBIC_DIR 该目录下会有alembic.ini以及YOUR_ALEMBIC_DIR的目录. alembic.ini 提供了一些基本的配置 YOUR_ ...

  9. 部署webservice到远程服务器

    在本地编写好webservice后并在本机验证正确后,在本地发布后,直接将发布时设置的文件夹复制到远程服务器上,在远程服务器的IIS上默认网站->新建虚拟目录->设置别名->物理路径 ...

  10. LeetCode 4Sum 4个数之和

    题意:这是继2sum和3sum之后的4sum,同理,也是找到所有4个元素序列,满足他们之和为target.以vector<vector<int>>来返回,也就是二维的,列长为4 ...