Home > database >  Database updates
Database updates

Time:09-29

company now need to be migrated mariadb database from one machine to another machine, a total of five tables, each table data volume has several dozens to hundreds of M, frequent change of the original data in the database, in the process of migration services cannot be stopped, and wants to be able to switch to a new database at any time after migration, the switch must be exactly the guarantee two data in the database, the database migration and switching process cannot loss of user data, do not know what way or what tools can solve?

CodePudding user response:

This feeling is a little difficult... Frequent changes, can not affect the service, and switch at any time

CodePudding user response:

Announcement, 2 PM to 6 am and month routine maintenance downtime

CodePudding user response:

refer to the second floor hongmei85 response:
announcement, 2 PM to 6 am and month routine downtime

But it will disturb you work and rest time, to I don't want to do this, and this is also our group leader left me a new task

CodePudding user response:

Someone has a better suggestion? Oneself the top

CodePudding user response:

It is ok to configure replication

CodePudding user response:

Add a from library can solve,

CodePudding user response:

A master-slave replication
 
* IP - 192.168.1.81 --

~ ~ ~ TXT
/root @ localhost ~ # vim/etc/my CNF
# (mysqld)
# GTID
Server_id=81
Gtid_mode=on
Enforce_gtid_consistency=on
# binlog
Log_bin=master - binlog
The log - slave - updates=1
Binlog_format=row
# relay log
Skip_slave_start=1
/root @ localhost ~ # systemctl restart mysqld
~ ~ ~

~ ~ ~ TXT
Mysql> The use of mysql;
Mysql> Update the user set the host='%' where the user='root';
Mysql> flush privileges;
~ ~ ~

* IP - 192.168.1.82 -- from

~ ~ ~ TXT
/root @ localhost ~ # vim/etc/my CNF
# (mysqld)
# GTID
Server_id=82
Gtid_mode=on
Enforce_gtid_consistency=on
# binlog
The log - bin=slave - binlog
The log - slave - updates=1
Binlog_format=row
# relay log
Skip_slave_start=1
/root @ localhost ~ # systemctl restart mysqld.
~ ~ ~

~ ~ ~ TXT
Mysql> The use of mysql;
Mysql> Update the user set the host='%' where the user='root';
Mysql> flush privileges;
~ ~ ~

~ ~ ~ TXT
/root @ localhost ~ # mysql -u root -p
Mysql> CHANGE the MASTER TO
MASTER_HOST='192.168.1.81',
MASTER_USER='root',
MASTER_PASSWORD='123456',
MASTER_PORT=3306,
MASTER_AUTO_POSITION=1;
~ ~ ~

~ ~ ~ TXT
Mysql> Start slave;
~ ~ ~

~ ~ ~ TXT
Mysql> Show slave status \ G;
~ ~ ~

CodePudding user response:

Everyone a great god, and have to install on the win10 mysql, I after the Ann didn't display system, and then according to the prompt also have conflict, please give me a great god help the younger brother, thanks for the post

CodePudding user response:

Can do backup library? Just want to oracle master-slave library
  • Related