当前位置:   article > 正文

Mysql集群搭建1-linux上Mysql的安装与配置_linux下mysql集群安装

linux下mysql集群安装

1.Mysql集群的原理

  通过访问虚拟ip值,在主keepalived没有宕机的情况下访问主keepalived的值对应的mysql,主keepalived宕机的情况下访问从keepalived对应的mysql.两个服务器通过虚拟ip关联.

2.Linux上Mysql的安装

1、配置YUM源

     1.yum源配置

    查看安装yum源成功
 yum repolist enabled | grep "mysql.*-community.*"


    可以修改 vim /etc/yum.repos.d/mysql-community.repo 源,改变默认安装的mysql版本。比如要安装5.6版本,将5.7源的enabled=1改 成        enabled=0。然后再将5.6源的enabled=0改成enabled=1即可。改完之后的效果如下所示:


2、安装MySQL
shell> yum install mysql-community-server

3、启动MySQL服务
shell> systemctl start mysqld
查看MySQL的启动状态
shell> systemctl status mysqld● mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled) Active: active (running) since 五 2016-06-24 04:37:37 CST; 35min ago Main PID: 2888 (mysqld) CGroup: /system.slice/mysqld.service └─2888 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/码创造者/article/detail/1006056
推荐阅读
相关标签
  

闽ICP备14008679号