mysql> show databases;
+--------------------+
| Database |
+--------------------+
| test |
| mysql |
| statt |
+--------------------+
3 rows in set (0.09 sec)
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
加载表和列名称完成的表信息
你可以关闭此功能,以获得更快的启动使用option:-A
就是在登陆数据库是加一个-A的option,不预读数据库的信息就ok了。
出现问题的原因是::
我们进入mysql 时,没有使用-A参数;
即我们使用
mysql -hhostname -uusername -ppassword -Pport 的方式进入数据,
而没有使用
mysql -hhostname -uusername -ppassword -Pport -A的方式进入数据库。
当我们打开数据库,即use dbname时,要预读数据库信息,当使用-A参数时,就不预读数据库信息。
还有可能锁表
使用show processlist;命令查看有哪些进程阻塞;
kill 380527;
这样就可以了。