Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet444/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   440   441   442   443   444   445   446   447   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 343 
]
At this point, we have one database server already. To set up a secondary database 
instance, all you really need in order to begin the process is to set up another 
physical server or virtual machine and install the 
mariadb-server
 package as we did 
earlier. If you've already set up two database servers as recommended earlier in the 
chapter, you're ready to begin. If not, feel free to spin up another virtual machine 
and follow the process from the 
Installing MariaDB
 section, which covered the initial 
setup of MariaDB. Go ahead and set up another server if you haven't already done 
so. Of your two servers, one should be designated as the primary and the other as 
the secondary, so make a note of the IP addresses for each.
To begin, we'll first start working on the primary. We'll need to edit the 
/etc/mysql/
conf.d/mysql.cnf
 file on the server you wish to be the primary. Currently, the file 
contains just the following line:
[mysql] 
Right underneath that, add a blank line and then the following code:
[mysqld] 
log-bin 
binlog-do-db=mysampledb 
server-id=1 
With this configuration, we're first enabling binary logging, which is required for 
a primary/secondary server to function properly. Binary logs contain records of 
all database changes, which enables a secondary database instance to reproduce 
changes made to the primary server. These binary logs record changes made to a 
database, which will then be transferred to a secondary server.
The industry is moving away from terms like "Master" and "Slave" 
to describe a primary and secondary server. In this chapter and 
moving forwards, we will use the terms "Primary" and "Secondary" 
to describe the relationship of one main database server, that 
replicates to another. Since this change started after Ubuntu 20.04 
was released, the commands and configuration inside Ubuntu 
20.04 still use 
master
 and 
slave
 when the relationships of the 
servers are described. Therefore, the verbiage around our actions 
will use "primary" and "secondary," even though the verbiage 
inside Ubuntu 20.04 still uses the old terminology. Just keep in 
mind that the naming will likely switch to a new naming scheme in 
the future.


Managing Databases

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   440   441   442   443   444   445   446   447   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish