MySQL 切换数据库、用户卡死:“You can turn off this feature to get a quicker startup with -A“处理方法
时间:2022-07-25
本文章向大家介绍MySQL 切换数据库、用户卡死:“You can turn off this feature to get a quicker startup with -A“处理方法,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
数据量很大的话,常规切换数据库会把里面所有的表遍历一遍,会很慢甚至是卡死。
解决方法: 登录的时候直接在最后面加一个 -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_0807mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
加上参数后可以看到直接就切换成功了。
[root@localhost ~]# "/usr/local/mysql-8.0.11/bin/mysql" -uroot -p123456 -A
mysql: [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 41
Server version: 8.0.11 MySQL Community Server - GPL
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
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 changed
mysql>
- 这个包绝对值得你用心体验一次!
- Python之函数的进阶(带参数的装饰器)
- 2017.10.2解题报告
- MVC 5 Scaffolder + EntityFramework+UnitOfWork Pattern 代码生成工具集成Visual Studio 2013
- 左手用R右手Python系列——百度地图API调用与地址解析/逆解析
- OpenCV实战:人脸关键点检测(FaceMark)
- Asp.Net MVC +EntityFramework主从表新增编辑操作的实现(删除操作怎么实现?)
- 模板模板模板模板模板模板模板模板模板模板模板模板模板模板模板模板模板模板模板模板
- 洛谷P1311 选择客栈
- 洛谷P1607 [USACO09FEB]庙会班车Fair Shuttle
- R语言抓包实战——知乎live二级页面获取
- 左手用R右手Python系列——面向对象编程基础
- 线性同余同余方程组解法(excrt)
- #19. 计数(容斥原理)
- MySQL 教程
- MySQL 安装
- MySQL 管理与配置
- MySQL PHP 语法
- MySQL 连接
- MySQL 创建数据库
- MySQL 删除数据库
- MySQL 选择数据库
- MySQL 数据类型
- MySQL 创建数据表
- MySQL 删除数据表
- MySQL 插入数据
- MySQL 查询数据
- MySQL where 子句
- MySQL UPDATE 查询
- MySQL DELETE 语句
- MySQL LIKE 子句
- mysql order by
- Mysql Join的使用
- MySQL NULL 值处理
- MySQL 正则表达式
- MySQL 事务
- MySQL ALTER命令
- MySQL 索引
- MySQL 临时表
- MySQL 复制表
- 查看MySQL 元数据
- MySQL 序列 AUTO_INCREMENT
- MySQL 处理重复数据
- MySQL 及 SQL 注入
- MySQL 导出数据
- MySQL 导入数据
- MYSQL 函数大全
- MySQL Group By 实例讲解
- MySQL Max()函数实例讲解
- mysql count函数实例
- MYSQL UNION和UNION ALL实例
- MySQL IN 用法
- MySQL between and 实例讲解