温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

mysql5.7安装以及数据库主从迁移

发布时间:2020-07-23 20:07:54 来源:网络 阅读:987 作者:小小三郎1 栏目:建站服务器

笔者下午趟了一下午的水



rpm -qa  mariadb*

yum remove  mariadb-libs-5.5.56-2.el7.x86_64-y

rpm -ivh mysql-community-common-5.7.9-1.el7.x86_64.rpm

rpm  -ivh  mysql-community-libs-5.7.9-1.el7.x86_64.rpm

rpm -ivh mysql-community-libs-compat-5.7.9-1.el7.x86_64.rpm

rpm -ivh  mysql-community-devel-5.7.9-1.el7.x86_64.rpm

rpm -ivh mysql-community-client-5.7.9-1.el7.x86_64.rpm

错误:

[root@s153mysqlrpm]# rpm -ivh mysql-community-server-5.7.9-1.el7.x86_64.rpm

警告:mysql-community-server-5.7.9-1.el7.x86_64.rpm:V3 DSA/SHA1 Signature, 密钥 ID 5072e1f5: NOKEY

错误:依赖检测失败:

         net-tools mysql-community-server-5.7.9-1.el7.x86_64 需要

[root@s153mysqlrpm]#

解决办法:

yum -yinstall  net-tools

rpm-ivh  mysql-community-server-5.7.9-1.el7.x86_64.rpm




问题:unblock with'mysqladmin flush-hosts'Connection closed by foreign host

解决办法:

http://www.cnblogs.com/susuyu/archive/2013/05/28/3104249.html


mysql>start slave;

ERROR1872 (HY000): Slave failed to initialize relay log info structure from therepository

解决办法:重新做主从

stopslave;

resetslave;

changemaster to

master_host='masterip',

master_user='slave',

master_password='123456',

master_port=3306,

master_log_file='mysql-bin.000145',

master_log_pos=193963694;



showslave status \G 报错

 Got fatal error 1236 from master when readingdata from binary log: 'A

 slave with the same server_uuid as this slavehas connected to the master;

 the first event 'mysql-bin.000155' at193963604, the last event read from

 './mysql-bin.000155' at 123, the last byteread from './mysql-bin.000155' at 193963604.'

 

 

showvariables like 'server_id';

mv  datadir/auto.cnf  /tmp

systemctl  restart mysqld

 

主要是拷贝auto.cnf  重复


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI