MySQL 切换数据库、用户卡死:“You can turn off this feature to get a quicker startup with -A“处理方法
发布日期:2021-06-30 16:45:16
浏览次数:2
分类:技术文章
本文共 1523 字,大约阅读时间需要 5 分钟。
数据量很大的话,常规切换数据库会把里面所有的表遍历一遍,会很慢甚至是卡死。
解决方法: 登录的时候直接在最后面加一个 -A 就行了。
[root@localhost ~]# "/usr/local/mysql-8.0.11/bin/mysql" -uroot -p123456 -A
实战演示: 我演示的数据库就是一个数据量很大的数据库,切换数据库时半天也没有好。
mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || ncc_0807auto || ncc_0807mysql || performance_schema || sys |+--------------------+6 rows in set (0.00 sec)mysql> use ncc_0807mysqlReading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -A
加上参数后可以看到直接就切换成功了。
[root@localhost ~]# "/usr/local/mysql-8.0.11/bin/mysql" -uroot -p123456 -Amysql: [Warning] Using a password on the command line interface can be insecure.Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 41Server version: 8.0.11 MySQL Community Server - GPLCopyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || ncc_0807auto || ncc_0807mysql || performance_schema || sys |+--------------------+6 rows in set (0.01 sec)mysql> use ncc_0807mysql;Database changedmysql>
喜欢的点个赞❤吧!
转载地址:https://lanzao.blog.csdn.net/article/details/107990615 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
路过,博主的博客真漂亮。。
[***.116.15.85]2024年04月28日 21时44分43秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
redis集群之主从模式+哨兵模式
2019-04-30
JavaScript原生开关灯效果
2019-04-30
企业邮箱如何申请注册,邮箱申请如何免费注册?
2019-04-30
微信企业邮箱,手机邮箱格式地址怎么写?
2019-04-30
公司如何申请企业邮箱,公司邮箱怎么申请,公司企业邮箱哪个好?
2019-04-30
电子邮箱账号怎么申请,怎样申请邮箱账号呢
2019-04-30
邮箱怎么发邮件,邮件发信量多少,职场新人怎么发汇报邮件呢?
2019-04-30
maven 多层次pom 新引入包,编译成功,还是没有将包引入到本地
2019-04-30
leetCode2 两数相加
2019-04-30
【工具使用】使用pip与conda安装、更新与卸载Pytorch和torchvision
2019-04-30
【工具使用】Google免费云环境Colaboratory使用
2019-04-30
【深度学习笔记】卷积层,全连接层,池化层的相关输出参数计算
2019-04-30
【NLP学习笔记】文本分类概述
2019-04-30
【深度学习笔记】文本分类
2019-04-30
【转载】炼丹实验室:深度学习网络调参技巧
2019-04-30