在rhel7中安装mysql5.7

 4  poweroff
    5  yum install -y vim  wget net-tools
    6  wget http://172.25.254.254/materials/mysql-5.7.repo -P /etc/yum.repos.d/
    7  cd /etc/yum.repos.d/
    8  ll
    9  yum cleanall
   10* 
   11  yum makecache
   12  rpm -e mariadb-libs --nodeps
   13  yum -y install mysql-community-server
systemctl start mysqld
   23  grep password /var/log/mysqld.log 
 mysqladmin -uroot -p'(Uploo00ing)' password '(Uploo00king)'
 mysql -uroot -p'(Uploo00king)'
change master to master_host='172.25.8.11',master_user='slave',master_password='(Uploo00king)',master_log_file='mastera.000005',MASTER_LOG_POS=154;
=============================================================
在wokestation中批量安装mysql-community-server
[root@workstation0 ~]# ssh-keygen
[root@workstation0 ~]# for i in 11 12 13 14 ;do ssh-copy-id root@172.25.8.$i;done
wget http://172.25.254.254/materials/mysql-5.7.repo
for i in 11 12 13 14;do scp mysql-5.7.repo 172.25.8.$i:/etc/yum.repos.d/; done
for i in 11 12 13 14 ;do ssh root@172.25.8.$i "yum clean all; yum makecache";done
for i in 11 12 13 14 ;do ssh root@172.25.8.$i "rpm -e --nodeps mariadb-libs";done
for i in 11 12 13 14 ;do ssh root@172.25.8.$i "yum -y install vim mysql-community-server";done






主从同步Last_IO_Errno:1593  解决方法:masterb:>stop slave   mastera:systemctl restart mysqld  masterb:>start slave

posted @ 2016-09-07 21:47  希曼博客  阅读(246)  评论(0编辑  收藏  举报