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 5种连接字符串的方法
- Python 装饰器(Decorator)
- linux学习第三十七篇:安装PHP5,安装PHP7
- linux学习第三十八篇: Apache和PHP结合,Apache默认虚拟主机
- Python lambda表达式
- Python的闭包(Closure)与惰性计算(Lazy Evaluation)
- linux学习第三十九篇:Apache用户认证,域名跳转,Apache访问日志
- Python sorted()函数
- Python filter()函数
- Python reduce()函数
- Python map()函数
- Python iterator迭代器
- How To Implement The Decision Tree Algorithm From Scratch In Python (从零开始在Python中实现决策树算法)
- 『教程』微信小程序webview的使用
- 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 实例讲解
- python快速排序
- 扩展 Microsoft.Owin.Security
- Angular 2 版本的 ng-bootstrap 初体验
- 揭开MySQL“锁”的神秘面纱
- 从0到1开发测试平台(九)后端对接口response的封装
- 在 Mac OS X 上安装和配置 Wine
- 性能测试之nginx访问日志分析
- Pytest之断言
- R语言单因素方差分析简单小例子
- 回炉重造:计算图
- CenterNet的骨干网络之DLASeg
- 一份朴实无华的移动端盒子滤波算法优化笔记
- [译]基于以太坊和USDC搭建去中心化金融系统
- 使用Substrate开发区块链存证dApp
- Flutter Dojo设计之道——如何打造一个通用的Playground