Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql5.7 installation and database master-slave migration

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The author waded in the water all afternoon.

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

Error:

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

Warning: mysql-community-server-5.7.9-1.el7.x86_64.rpm: header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY

Error: dependency detection failed:

Net-tools is needed by mysql-community-server-5.7.9-1.el7.x86_64

[root@s153mysqlrpm] #

Solution:

Yum-yinstall net-tools

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

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

Solution:

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

Solution: be the master and follower again.

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 reported an error

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

Mainly copy auto.cnf repetition

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report