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 - GPLCopyright (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>
喜欢的点个赞❤吧!
MySQL 切换数据库、用户卡死:“You can turn off this feature to get a quicker startup with -A“处理方法相关推荐
- mysql You can turn off this feature to get a quicker startup with –A
mysql You can turn off this feature to get a quicker startup with –A mysql -A 参数含义: 含义是-A将不预读数据库信息,这 ...
- use database 很慢/You can turn off this feature to get a quicker startup with –A
mysql> use information_schema Reading table information for completion of table and column names ...
- Mysql创建数据库用户
Mysql为数据库创建用户 通常情况下我们在编写代码的过程中(也就是在开发过程中),一直使用的是我们本地的mysql,而且用户都是root用户,最高权限的用户,但是我们如果在公司上班的时候,公司的领导 ...
- mysql 切换数据库方案
业务场景 在SAAS模式下,不同的租户需要切换数据库,我们可以使用动态数据源,动态数据源有个问题,就是需要对每一个数据库创建一个连接池,在初始化的时候初始化这些连接池, 如果多台应用服务器的情况,每一 ...
- MySQL(3)数据库用户管理
文章目录 一.用户管理 1.1 新建用户 1.2 查看用户信息 1.3 重命名用户 1.4 删除用户 1.5 修改当前登录用户密码 1.6 修改其他用户密码 1.7 忘记 root 密码的解决办法 二 ...
- MySQL删除匿名用户,保证登录安全
博客地址已迁往 www.virtclouds.com 原文地址 http://www.virtclouds.com/538.html 很多MySQL程序都会带有匿名登录的功能. 在刚刚安装完MySQL ...
- mysql删去root用户无法登录_MySQL误删root用户导致无法登陆解决方法
测试环境 删除前 mysql> select user,host,password from mysql.user; +------+-----------+------------------ ...
- mysql command denied_Mysql 用户权限管理--从 xxx command denied to user xxx
今天遇到一个mysql 权限的问题,即标题所述 xxx command denied to user xxx,一般mysql 这种报错,基本都属于当前用户没有进行该操作的权限,需要 root 用户授 ...
- [MYSQL / Mariadb]数据库学习-库、表管理
数据库基础的库.表管理 数据库基础 库管理 MySQL中加上system,可以执行Linux命令 一行写多个命令 表管理 建表 例: 查表架构 创建表记录 查表的创建命令和属性 加\G,可分行显示 修 ...
最新文章
- 教程:13、用户管理
- 洛谷-P1896 [SCOI2005]互不侵犯
- vsftp421问题
- 简单的相似图片搜索的原理
- 10道Python面试常见的问题
- mysql第五章 在线测试_PHP+MySQL来实现在线测试quiz功能
- POJ 2253 Frogger (求某两点之间所有路径中最大边的最小值)
- 单日课程超10万节!VIPKID 如何通过实时计算提升上课体验?
- php 各种排序算法,PHP四种常见排序算法
- docker create_云计算-Docker个人学习笔记
- qpython3 获取手机gps接口
- poster模板_高分北斗大赛报名进行中,ppt、poster展示模板推送
- Linux快捷键详解
- 蓝牙开发那些事儿(1)——从抓包数据开始
- 移动电源快充QC3.0方案芯片IP5318快充方案
- Java常量池简单认识
- 俄罗斯方块c语言程序报告摘要,俄罗斯方块c语言程序
- c语言最简单的程序流程图,高手帮忙画个流程图简单的俄罗斯方块C语言程 – 手机爱问...
- CS1703 C# Multiple assemblies with equivalent xxx... and. Remove one of the duplicate references.
- 列车排座2 算法笔试题
热门文章
- 【mmall】Guava框架
- Android 将Openfire中的MUC改造成类似QQ群一样的永久群
- MyBatis中的大于、小于、like等符号写法
- string.Join和Reverse的简单使用示例
- BZOJ2986 Non-Squarefree Numbers
- 【Android Developers Training】 93. 创建一个空验证器
- poj 1065 Wooden Sticks
- mysql 5.6到percona 5.6小版本升级
- STM8不用手动复位进入自带Bootloader方法(串口下载)
- ZOJ 3829 贪心 思维题