Does MySQL support master-master replication?

|
tamga8 2021-04-06 13:35:57
There available only master-slave
tamga8 2021-04-06 13:36:53
And I am considering alternative database systems
tamga8 2021-04-06 13:37:39
And my question is
does MySQL support master-master replication?
tamga8 2021-04-06 13:39:12
Can I use Group Replication for this case?
ColonelMustang 2021-04-06 13:42:13
tamga8 2021-04-06 13:39:12
Can I use Group Replication for this case?

you can use an InnoDB cluster

Deploy MySQL InnoDB Clusters for high availability

Deploy MySQL InnoDB Clusters for high availabilitySQL Shack – articles about database auditing, server performance, data recovery, and more
In this article, I have explained the deployment process of the MySQL InnoDB cluster. In the first part, I have covered the process of mapping the Host and IP Address, creating user and grant appropriate rights and configure the group replication
acromegale 2021-04-06 13:42:28
Hi, yes, she have builtin master-master. Group replication is replacement for galera cluster and needs if you want multimaster setup.
tamga8 2021-04-06 13:45:48
I will go to study the docs
#g* 2021-04-06 15:23:10
mysql_en-9034.jpg
Write a query to find the name (first_name, last_name), job, department ID and name of the employees who works in London.
#g* 2021-04-06 15:24:55
How can I write this query? Help me!
#g* 2021-04-06 15:26:06
In Locations table record city=London; not in country table
#g* 2021-04-06 15:41:19
Can anyone help me ?
tamga8 2021-04-06 16:12:09
Guys, returning to replication
what are the requirements

there are 3 independent separated stages (each stage will be used by own users)
each stage reads/writes to own database
each stage should be able to read data from other stages
therefore need to replicate databases
stage1 <-> stage2 <-> stage3
the channel between stages may disappear, sometimes for several hours

stages should not influence each other
if stage1 stopped/disappear, other stages should work as if nothing happened

tamga8 2021-04-06 16:13:36
what MySQL can provide for this case?
tamga8 2021-04-06 16:16:33
Group Replication seems that there are several servers united into group, and application interacts with this group as one server
tamga8 2021-04-06 16:19:34
in my case, each stage considered as independent, clients will connect to own database
tamga8 2021-04-06 16:21:05
each stage have to use own database
tamga8 2021-04-06 16:21:20
there need to only replicate data between stages
#g* 2021-04-06 16:22:02
#g* 2021-04-06 15:23:10
Write a query to find the name (first_name, last_name), job, department ID and name of the employees who works in London.

How can I write this query any idea?

tamga8 2021-04-06 16:22:52
#g* 2021-04-06 16:22:02
How can I write this query any idea?

Are you student?

#g* 2021-04-06 16:23:11
Nope
tamga8 2021-04-06 16:24:36
sorry, but it is a very simple task
you should join the tables
#g* 2021-04-06 16:24:56
Have u seen this tables?
#g* 2021-04-06 16:25:36
How I can join these table if there schema is unrelated to particular data
tamga8 2021-04-06 16:35:05
select FIRST_NAME, LAST_NAME, JOB_TITLE, DEPARTMENT_ID
from employees e
inner join jobs j on e.job_id=j.job_id
inner join departments d on e.department_id=d.department_id
inner join locations l on d.location_id=l.location_id
where l.city = ‘LONDON’
#g* 2021-04-06 16:40:09
Okay thank u, let’s I am trying with that
tamga8 2021-04-06 16:40:36
sorry, it is a very simple task, it is better not to ask such questions
#g* 2021-04-06 16:41:17
I apologize for that
piterden 2021-04-06 16:42:11
tamga8 2021-04-06 16:40:36
sorry, it is a very simple task, it is better not to ask such questions

Actually there isn’t hardness limitations for questions. The main goal is clearness ))

tamga8 2021-04-06 16:49:53
ok, accepted
tamga8 2021-04-06 16:51:52
@piterden do you know a larger community of MySQL?
piterden 2021-04-06 20:20:14
tamga8 2021-04-06 16:51:52
@piterden do you know a larger community of MySQL?

Do you speak Russian?

tamga8 2021-04-07 13:02:48
yes, I do
piterden 2021-04-07 19:58:13
tamga8 2021-04-07 13:02:48
yes, I do

Join main ru chat

đŸŠčđŸ»â€â™‚ïž 2021-04-10 19:48:18
guys, hello, got a tricky (probably) question.

Got mariadb mysql v8.5+ (cant remember straight) innodb AFAIK
Is it possible to declare and use cursors with recursive cte?
I tried this, but can’t get rid of syntax errors, and no im not banned on google – i couldn’t find whether this is totally impossible or any working examples.

Based on docs – it is possible.

My target is to grab non-existent intervals from binary heap table to later traverse through those intervals

DECLARE levels_looper cursor FOR
WITH RECURSIVE nodes_levels(level, nodemin,nodemax) AS (
SELECT 2, subtree_root_node_id*2, subtree_root_node_id*2+1
UNION ALL
SELECT level + 1, pow(2,level)*subtree_root_node_id, pow(2,level)*subtree_root_node_id+pow(2,level)-1
FROM nodes_levels
WHERE level <= levels_total+1)
SELECT level-1,nodemin,nodemax from nodes_levels;

piterden 2021-04-10 20:39:27
đŸŠčđŸ»â€â™‚ïž 2021-04-10 19:48:18
guys, hello, got a tricky (probably) question.

Got mariadb mysql v8.5+ (cant remember straight) innodb AFAIK
Is it possible to declare and use cursors with recursive cte?
I tried this, but can’t get rid of syntax errors, and no im not banned on google – i couldn’t find whether this is totally impossible or any working examples.

Based on docs – it is possible.

My target is to grab non-existent intervals from binary heap table to later traverse through those intervals

DECLARE levels_looper cursor FOR
WITH RECURSIVE nodes_levels(level, nodemin,nodemax) AS (
SELECT 2, subtree_root_node_id*2, subtree_root_node_id*2+1
UNION ALL
SELECT level + 1, pow(2,level)*subtree_root_node_id, pow(2,level)*subtree_root_node_id+pow(2,level)-1
FROM nodes_levels
WHERE level <= levels_total+1)
SELECT level-1,nodemin,nodemax from nodes_levels;

Yebat’ ne uznal tyebia v maske

|