Skip to content

翻了车的老司机

其实我一直在你身边

Search for:

mysqlCategorySubscribe

mysql 查看指定表的实际磁盘存储大小

mysql 查看指定表的实际磁盘存储大小

  • Posted on: 2019年12月3日 2019年12月3日
  • Author: zzs10086
  • Categories: mysql
  • Leave a comment: mysql 查看指定表的实际磁盘存储大小

mysql 开启慢查询日志

慢日志查询没有开启,可以开启一下。
找到my.cnf,添加如下内容sudo vim /usr/local/mysql/my.cnf

  • Posted on: 2019年11月20日 2019年11月20日
  • Author: zzs10086
  • Categories: mysql
  • Leave a comment: mysql 开启慢查询日志

mysql 替换不是以http://开头的

查询是以http开头的 select * from tt_archives where thumb REGEXP ‘^http://’
查询不是以http开头的 select * from tt_archives where thumb not REGEXP ‘^http://’

  • Posted on: 2018年1月15日 2018年1月15日
  • Author: zzs10086
  • Categories: mysql
  • Leave a comment: mysql 替换不是以http://开头的

mysql 命令导入导出sql

导出(不进入mysql)
mysqldump -h10.168.193.2 -uwanyouxicom -p52wyxg7P3v5N7 wanyouxicom wyx_phome_ecms_advert>advert.sql

导入(进入mysql)
source /dir_for_sql_file/sql.sql

  • Posted on: 2018年1月5日 2019年11月29日
  • Author: zzs10086
  • Categories: mysql
  • Leave a comment: mysql 命令导入导出sql

mysql linux 命令创建数据库

mysql -uroot -p1234
create database wiki default charset utf8;
use wiki;
source /your_wiki_sql_file_path/wiki.sql

  • Posted on: 2018年1月5日 2019年11月29日
  • Author: zzs10086
  • Categories: mysql
  • Leave a comment: mysql linux 命令创建数据库

mysql 字符串替换

update by_article set pic_url = replace(pic_url,’oyskpbhvb.bkt.clouddn.com’,’wximg.checheng.cn’)

  • Posted on: 2018年1月5日 2019年11月29日
  • Author: zzs10086
  • Categories: mysql
  • Leave a comment: mysql 字符串替换

mysql 按周分组查询

select date,DATE_FORMAT(date,’%Y%m’) weeks,sum(`install`) install_count,sum(`launches`) launches_count,sum(`active`) active_count from tj_app_day_data where date >=’2017-10-25′ and date<='2017-12-17' group by weeks;

  • Posted on: 2018年1月5日 2019年11月29日
  • Author: zzs10086
  • Categories: mysql
  • Leave a comment: mysql 按周分组查询

mysql 按月分组查询

select `date`,DATE_FORMAT(date,’%Y%m’) months,sum(`install`) install_count,sum(`launches`) launches_count,sum(`active`) active_count from tj_app_day_data where appid=’$appid’ and date >=’$start_date’ and date<='$end_date' group by months

  • Posted on: 2018年1月5日 2019年11月29日
  • Author: zzs10086
  • Categories: mysql
  • Leave a comment: mysql 按月分组查询

新建mysql远程用户

GRANT ALL PRIVILEGES ON *.* TO ‘username’@’%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION; 所有数据库所有表
GRANT ALL PRIVILEGES ON xinchuanbo.* TO ‘zzs’@’%’ IDENTIFIED BY ‘123456’ WITH GRANT OPTION; 开通用户:zzs 密码:123456 数据库 xinchuanbo (远程操作)

  • Posted on: 2018年1月4日 2019年11月29日
  • Author: zzs10086
  • Categories: mysql
  • Leave a comment: 新建mysql远程用户

分类目录

  • elasticsearch
  • git
  • go
  • java
  • laravel
  • Linux
  • mysql
  • nginx
  • node.js
  • php
  • redis
  • shell
  • vue
  • webpack
  • 小程序
Search for:
2019年十二月
一 二 三 四 五 六 日
« 11月    
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

近期文章

  • mysql 查看指定表的实际磁盘存储大小
  • Laravel withCount 用法
  • laravel 请求接口data
  • php 数组 转换 js数组
  • 通过监控Nginx日志来实时屏蔽高频恶意访问的IP

近期评论

  • 会飞的鱼发表在《elasticsearch linux 常用命令》
  • zzs10086发表在《ECS nginx负载均衡实施方案》
  • zzs10086发表在《windows git ssh keys 生成》

© 2019 翻了车的老司机. 我在你身边绕了一个圈,回到原点你却已在远方,思念悔恨萦绕一生。

苏ICP备16035736号-3