首页
点滴
MySQL常用命令
#### 查看数据库版本 ``` SELECT VERSION(); ``` #### 查看数据库对象占用空间大小 ``` SELECT concat(round(sum(data_length/1024/1024/1024),2),'G') as data FROM tables WHERE table_schema = '数据库对象名'; ``` #### 查看数据库对象各个表的数据量 ``` SELECT table_name,table_rows FROM information_schema.tables WHERE table_schema = '数据库对象名' ORDER BY table_rows DESC; ``` #### 查看Mysql用户的加密规则,8.0版本之前是:mysql_native_password,8.0版本之后是:caching_sha2_password ``` SELECT host,user,password_expired,plugin FROM mysql.user ``` #### 查询sql_mode ``` select @@sql_mode; ``` #### 查看字符编码集 ``` SHOW VARIABLES LIKE 'character%'; ``` #### 查看最大连接数 ``` show variables like '%max_connections%'; ```
博客分类
源码解析 (1)
Java (10)
Linux (8)
多线程 (5)
Docker (9)
SpringBoot (14)
微服务 (1)
Redis (15)
MySQL (7)
VMware (3)
Nginx (15)
MyBatis (2)
Git (7)
RabbitMQ (1)
工具类 (12)
前端 (3)
友情链接
layui
© 2020-2025 www.chenhuazhan.com All Rights Reserved 备案号:
桂ICP备17004487号-1
粤公网安备44030002005146