随笔分类 -  mysql

mysql 配置主从复制
摘要:简介:mysql 实现主从复制的原理 通过主数据库binlog文件重做实现数据同步(尽量保证mysql版本相同) 1. 准备两台mysql服务 ip1:192.168.44.3 主服务器 ip2:192.168.44.5 从服务器 主服务器 2. 配置my.cnf vim /etc/my.conf 阅读全文

posted @ 2021-01-12 18:10 旭彬 阅读(124) 评论(0) 推荐(0) 编辑

MySQL 幻读详解
摘要:啥是幻读 The so-called phantom problem occurs within a transaction when the same query produces different sets of rows at different times. For example, if 阅读全文

posted @ 2020-06-08 00:06 旭彬 阅读(3432) 评论(0) 推荐(0) 编辑

case when 多个条件 以及case when 权重排序
摘要:1. case when 多个条件 语法: SELECT nickname,user_name,CASE WHEN user_rank = '5' THEN '经销商' WHEN user_rank = '6' THEN '代理商'WHEN user_rank = '7' THEN 'VIP'ELS 阅读全文

posted @ 2018-06-07 18:27 旭彬 阅读(83973) 评论(0) 推荐(0) 编辑

mysql的length与char_length的区别
摘要:length: 是计算字段的长度一个汉字是算三个字符,一个数字或字母算一个字符 char_length:不管汉字还是数字或者是字母都算是一个字符 同时这两个函数,可用于判断数据中是否有中文文字 例如: select col from table where length(col) != char_l 阅读全文

posted @ 2018-06-04 10:45 旭彬 阅读(212) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示