惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Heimdal Security Blog
A
Arctic Wolf
K
Kaspersky official blog
V
Vulnerabilities – Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
L
LINUX DO - 热门话题
MongoDB | Blog
MongoDB | Blog
T
Threat Research - Cisco Blogs
D
Docker
爱范儿
爱范儿
T
Tenable Blog
C
Check Point Blog
B
Blog
C
Cisco Blogs
Vercel News
Vercel News
The Cloudflare Blog
T
Threatpost
NISL@THU
NISL@THU
T
Tor Project blog
V2EX - 技术
V2EX - 技术
P
Palo Alto Networks Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tailwind CSS Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
SecWiki News
SecWiki News
博客园 - 司徒正美
S
Security @ Cisco Blogs
GbyAI
GbyAI
S
Secure Thoughts
Microsoft Security Blog
Microsoft Security Blog
The Register - Security
The Register - Security
Recorded Future
Recorded Future
Cloudbric
Cloudbric
Webroot Blog
Webroot Blog
N
News and Events Feed by Topic
Y
Y Combinator Blog
博客园_首页
T
Troy Hunt's Blog
The Hacker News
The Hacker News
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
U
Unit 42
AWS News Blog
AWS News Blog
PCI Perspectives
PCI Perspectives
V
Visual Studio Blog
博客园 - 聂微东
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell

博客园 - 周国选

SQL数据库中修改表的所有者 llinux mount 新建磁盘到指定目录 Centos下apache默认主页修改 CentOS Apache配置详解 Fotolog 的 Solaris/MySQL 架构 Linux MySQL主从复制(Replication)配置 MySql常用命令总结 备份MySQL出现Can’t open file when using LOCK TABLES错误 ORACLE常用Script Oracle的特色和选项 Oracle入门--启动和关闭详解 如何在sql*plus中使用方向键和删除键 SQL Plus常用命令 SELinux相关指令工具 在Linux上安装Memcached服务 LINUX常用命令 Linux VI/VIM常用命令 memcached telnet操作 Quartz.NET克隆表达式 - 周国选 - 博客园
mysql不预读数据库信息(use dbname 更快,不会卡)
周国选 · 2011-09-13 · via 博客园 - 周国选

2011-09-13 17:40  周国选  阅读(1597)  评论()    收藏  举报

mysql> use dbname
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参数;
       即我们使用
           mysql -hhostname -uusername -ppassword -Pport 的方式进入数据,
       而没有使用
           mysql -hhostname -uusername -ppassword -Pport  -A的方式进入数据库。
 
          当我们打开数据库,即use   dbname时,要预读数据库信息,当使用-A参数时,就不预读数据库信息。