连接登录mysql使用-A参数

连接登录数据库的时候出现以下文字
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参数; 当我们打开数据库,即use dbname时,要预读数据库信息,当使用-A参数时,就不预读数据库信息。

当数据库中表非常多,如果预读数据库信息,将非常慢,可能会卡住,如果数据库中表非常少,将不会出现问题。

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

  

posted @ 2022-07-25 22:01  lucky_tomato  阅读(2137)  评论(0编辑  收藏  举报