Тёмный

How to Set up Master Slave Replication in MySQL: Hands-on! 

CodingX
Подписаться 2,5 тыс.
Просмотров 45 тыс.
50% 1

Опубликовано:

 

22 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 63   
@CodingX
@CodingX 4 года назад
Hi everyone, If you have any doubts on this video please comment below. Subscribe and stay tuned to get the latest video on #Web Server configuration, #AWS, #Cloud Computing, and many more every week.
@davek6693
@davek6693 3 года назад
Awesome tutorial, actually the only one which i came across that works. I really struggled with replication before this video. Thankyou
@CodingX
@CodingX 3 года назад
Thank you
@kirpalshergill
@kirpalshergill Год назад
Hello mate, I'm absolutely new to it. Let me start by first asking how to open two tabs and which Mysql are you writing this code on? thabks
@Smaranns
@Smaranns 3 года назад
Good tutorial worked for me for an azure master-slave replication Thanks
@aditidas3572
@aditidas3572 2 года назад
Getting Slave_IO_Running in Connecting state, please suggest why? tried many times!! :(
@AsimKhan13
@AsimKhan13 3 года назад
i have setup Mysql Master slave replication, i checked the replication was working fine and today i have this error on SLAVE : Error 'Unknown database 'pgdb'' on query. Default database: 'pgdb'. Query: 'alter table pg_log add partition (partition p20211005 values less than ('2021-10-05'))'
@Swamysharanamayyappa
@Swamysharanamayyappa 2 года назад
Can you explain performance tuning and query optimzation in mysql
@pandeyumesh1569
@pandeyumesh1569 3 года назад
Hi Team, Can any one suggest .. How to change replication filter in multi source Replication .. i.e. Chainal-1 replicate DB1.table1, Channel-2 replicate DB2.table2 Every chainal replicate spacific databases not all data bases ..
@CodingX
@CodingX 3 года назад
Sorry, umesh, I haven't that. Will let you know if I got something.
@Smaranns
@Smaranns 3 года назад
i need to do it for another database now, I tried to change the mysqld.cnf file and change the bin log db.. but when i check the show master status it stil shows the old db name.
@aeonzeon1344
@aeonzeon1344 3 года назад
thanks sir i setup my linux to linux perfectly... sir ask for merge replication tutorials
@nexus718
@nexus718 4 года назад
Hi, sir just wanted to ask could this setup work for slave localhost and master VPS?
@ashiqmumtaz8726
@ashiqmumtaz8726 Год назад
is there any way that we can set the slave's server-id by master?
@rishabhchd19
@rishabhchd19 3 года назад
Hi, good tutorial. How to sync both servers so that any change is written to SLAVE also reflect to Master?
@CodingX
@CodingX 3 года назад
You have to achieve this by the distributed database system.
@rishabhchd19
@rishabhchd19 3 года назад
@@CodingX any video on that?
@CodingX
@CodingX 3 года назад
@@rishabhchd19 not yet.
@nissyj836
@nissyj836 3 года назад
@rishabh : did you achieve ?
@MaxPayne-o8f
@MaxPayne-o8f 3 года назад
To achieve that you must Setup a master - master relationship between your mysql servers.
@pritikashyap457
@pritikashyap457 4 года назад
Hi, sir have you any video to create mysql configuration file like inside this path - nano/etc/mysql/mysql.conf/mysqld ... Actually i want to know how we can create this (mysql.conf and mysqld) file initially.
@CodingX
@CodingX 4 года назад
I think, no need to create config file, it is already there you need to just edit as per your need.
@ranvijaymehta
@ranvijaymehta 3 года назад
Why Database created ? unnecessary new user will be confuse.
@aathifmohomed6329
@aathifmohomed6329 Год назад
after final command the reply file say as not permission to do.. please help
@edwardferguson1872
@edwardferguson1872 2 года назад
This video was very helpful. Thank you!
@veladisravankumar2635
@veladisravankumar2635 3 года назад
Thank you, actually I am looking about this concept. My requirement is "Am going to setup Disaster recovery of Mysql for production. It means if any thing happens for my master database, I need to switch db from master to slave in application. To achieve this, I have setup 2 mysql instances in AWS(master) and GCP(slave)".Is it work bw 2 clouds ? and after setup successful this configuration, if any problem in slave will it effect to master ? (ex: If slave shutdown suddenly, should not effect to master db because it's main production). Please provide your suggestions....Thanks in advance
@CodingX
@CodingX 3 года назад
Yes, it will work in 2 clouds and if master is affected then you can switch to slave. If slave affected, it doesn't affect to master.
@veladisravankumar2635
@veladisravankumar2635 3 года назад
@@CodingX Thank you, am trying it now
@veladisravankumar2635
@veladisravankumar2635 3 года назад
@@CodingX Thank You, It's working fine to me. My doubt is, we pointed one binlog file name to slave db. But after few days running mysql, new binlog files will generate ? then how it will work. Out pointed binlog will be old one. Please give your suggestions..
@veladisravankumar2635
@veladisravankumar2635 3 года назад
please provide your suggestions
@CodingX
@CodingX 3 года назад
@@veladisravankumar2635 MySQL keeping the track of log files, if you create slave it's always keep tracking of master log.
@saurabhtiwari-kg9vn
@saurabhtiwari-kg9vn 3 года назад
Plz help 🙏 I search on whole internet but i can't find any solution... after auditing mysql slave replication error 1032 occurs if you have any idea please guide me,i tried all skipping method but yet same error occur
@CodingX
@CodingX 3 года назад
The error indicates that the master deletes a row but when the slave try to do the same, it cannot find it in its database. That means, replication was not working or you hadn't put the same data in slave as master while setting up the slave. For this one solution is, do the all step again.
@saurabhtiwari-kg9vn
@saurabhtiwari-kg9vn 3 года назад
@@CodingX We have give the access of portal to our client so we can't do the steps again in master database.Please suggest any other method to solve this issue.🙏
@ddrr9388
@ddrr9388 5 месяцев назад
how to open the master server and slave server
@paulousstudio9140
@paulousstudio9140 3 года назад
When I try to create the same database for slave, the shell throws back "Database already exists". Note i am running (testing) on a local machine.
@CodingX
@CodingX 3 года назад
It won't work on local machine
@paulousstudio9140
@paulousstudio9140 3 года назад
@@CodingX Would you care to explain why is that so?I noticed you used 0.0.0.0 for your IP, if you were running it on a remote server why didn't you pass that IP?
@CodingX
@CodingX 3 года назад
@@paulousstudio9140 0.0.0.0 is wild IP, it means the server can accept any IP. to replicate, you need two servers
@paulousstudio9140
@paulousstudio9140 3 года назад
Alright thank you very much
@harapriyasahoo7029
@harapriyasahoo7029 2 года назад
Great video and my doubt was correct the guy behind the video is an Odia… not from name but from pronunciation….
@olumidemichael5049
@olumidemichael5049 2 года назад
Thank you! this helped
@amitbhattacharyya5925
@amitbhattacharyya5925 2 года назад
i have one question , if i read from master does the read operation shared between slaves or application has to connect each slave db separately, specifically for read.
@Singh7e7
@Singh7e7 4 года назад
Amazing. Great stuff! Always wanted to learn master slave.
@tanhoang5611
@tanhoang5611 3 года назад
so how to create another server with an IP. Can you help me with that?
@CodingX
@CodingX 3 года назад
Can you elaborate? what exactly you want to do?
@tanhoang5611
@tanhoang5611 3 года назад
@@CodingX I have a problem that I want to set master-slave replication on the same computer. So how can I create two server: master and slave like you did.
@CodingX
@CodingX 3 года назад
@@tanhoang5611 Then why do you need master-slave? You can directly access same DB right?
@balakrishnam507
@balakrishnam507 3 года назад
How you find out master ip address I. e 3.14.135.5 ?
@CodingX
@CodingX 3 года назад
This is your server IP where you hosted application
@balakrishnam507
@balakrishnam507 3 года назад
@@CodingX ok. How can I find out that?
@bilalmajeed6122
@bilalmajeed6122 Год назад
Thank you for wasting my 2 hours, I knew this, by your vocabulary but still I thought to follow along with you, such a shame. Slave_IO_State: Connecting to source - you have this same issue but you didn't address it. Slave_IO_Running: Connecting THank you again.
@Vikaskumar-ur5di
@Vikaskumar-ur5di 3 года назад
please created same video on hindi language
@CodingX
@CodingX 3 года назад
Thank you, I will make same video on Hindi
@Vikaskumar-ur5di
@Vikaskumar-ur5di 3 года назад
@@CodingX i need this type of video in hindi language
@srinathrao413
@srinathrao413 3 года назад
I followed same instruction step by step... but after inserting a new row in master system is just hanging Its neither inserted nor showing the same record in Slave... Is there anything to do with port openening of mysql (3306)... i am checking out this in Azure , Ubuntu , 18.x . Please help.
@CodingX
@CodingX 3 года назад
First check why it's not inserting into master. Slave will take from the log, master is not pushing the data to slave, so it should insert into master first. Then you will check it's updating or not in slave.
Далее
Database Replication Explained (in 5 Minutes)
5:02
Просмотров 56 тыс.
▼ ЕДУ В ТИХОСРАНСК 💪
37:00
Просмотров 307 тыс.
MySQL Master Slave replication using binlog position
13:27
Mysql On Premise Master To AWS RDS Slave Replication
12:52
Coding a Web Server in 25 Lines - Computerphile
17:49
Просмотров 340 тыс.
Database Replication & Sharding Explained
6:53
Просмотров 26 тыс.