mysql链接 -A参数

问题背景:数据库里创建了几个数据量在10万的表。mysql

今天使用mysql -hhostname -uusername -ppassword -Pport 的方式进入数据,链接成功。sql

而后运行了use dbname命令,出现了下面一段话。数据库

第一次见到这个语句,因此查了一下。ui

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -Athis

出现问题的缘由是:: 咱们进入mysql 时,没有使用-A参数; 当咱们打开数据库,即use dbname时,要预读数据库信息,当使用-A参数时,就不预读数据库信息。code

当数据库中表很是多,若是预读数据库信息,将很是慢,可能会卡住,若是数据库中表很是少,将不会出现问题。orm

正确的打开方式是: mysql -hhostname -uusername -ppassword -Pport -A的方式进入数据库。get

相关文章
相关标签/搜索