![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
CodeStream_
这个作者很懒,什么都没留下…
展开
-
Mysql中的 and 与or 优先级别
最近 在开发中用到了多个条件 并且有 or 的条件语句 当 select * from table where a and 条件 b OR 条件 c 的时候 需要将 or 条件用括号括起来再用 and 连接 如下select * from table where 条件 a and (条件 b OR 条件 c);原创 2016-08-15 23:48:30 · 6130 阅读 · 0 评论 -
数据库设计
要么尽量遵循范式理论的规约,尽可能少的冗余字段,让数据库设计看起来精致、优雅、让人心醉。要么合理的加入冗余字段这个润滑剂,减少 join,让数据库执行性能更高更快。尽量避免多表查询 避免性能浪费原创 2017-01-18 10:15:25 · 244 阅读 · 0 评论 -
Linux下mysql修改字符集
登录到 mysql# mysql -uroot -p 查看字符集 show variables like '%character%';+--------------------------+----------------------------+| Variable_name | Value |+----------------原创 2017-02-20 18:34:47 · 379 阅读 · 0 评论 -
Canal配置
我们使用 Mysql 的 bin-log 实现数据库与外部缓存的同步 这里使用阿里的 canal 中间件 相应的 cannal 客户端也是 canal canal 地址 https://github.com/alibaba/canal/ 文档相关 https://github.com/alibaba/canal/wiki/QuickStart maven 依赖:<dependency>转载 2017-02-20 18:48:58 · 758 阅读 · 0 评论 -
mysql远程访问被拒绝
以 root 账号进入 mysql,use mysql;grant all privileges on *.* to 某个用户 @"%" identified by "用户密码";flush privileges;其中*.*是将所有的数据库赋予某个用户 也可以指定某个库database.*其中"%"是允许远程连接的 IP 地址 如果不想控制具体某个 ip 就使用"%"如果 flush 后仍然链接不上原创 2016-12-07 21:08:14 · 762 阅读 · 0 评论