![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MySQL
六月的雨季@
总想赢者必输,不怕输者必赢。
展开
-
MySQL 常用复制架构
一、常规复制架构(Master --- Slaves) 在实际应用场景中,MySQL 复制 90% 以上都是一个 Master 复制到一个或者多个Slave 的架构模式。 缺点: 1、master不能停机,停机就不能接收写请求 2、slave过多会出现延迟 由于master需要进行常规维护停机了,那么必须要把一个slave提成master,选哪一个是一个问题? 某一个slave提成master了,就存在当前master和之前的master数据不一致的情况,并且之master并没有保存原创 2021-06-24 18:08:36 · 297 阅读 · 0 评论 -
MySQL主从复制中报错Authentication plugin ‘caching_sha2_password‘ reported error: Authentication
在从库上执行 show slave status\G 命令 显示报错: Last_IO_Error: error connecting to master 'repluser@188.131.212.XX:3309' - retry-time: 60 retries: 2 message: Authentication plugin 'caching_sha2_password' reported error: Authentication requires secure connection. ..原创 2021-06-23 09:47:25 · 2984 阅读 · 0 评论 -
什么情况下MySQL数据库索引会失效?
(1)条件中有or,则索引会失效 (2)对于多列索引,不是使用的第一部分,则不会使用索引 (3)like查询是以%开头 (4)如果列类型是字符串,那一定要在条件中将数据使用引号引用起来,否则不使用索引 (5)如果mysql估计使用全表扫描要比使用索引快,则不使用索引 ...原创 2020-04-23 16:56:19 · 1016 阅读 · 0 评论