Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet445/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   441   442   443   444   445   446   447   448   ...   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)

[
 344 
]
Another configuration file that we'll need to edit is 
/etc/mysql/mariadb.conf.d/50-
server.cnf
. In this file, we have the following line:
bind-address = 127.0.0.1 
With this default setting, the 
mysql
 daemon is only listening for connections on 
localhost (
127.0.0.1
), which is a problem since we'll need to connect to it from 
another machine (the secondary server). Change this line to the following:
bind-address = 0.0.0.0 
Next, we'll need to access the MariaDB shell on the primary server and execute the 
following commands:
GRANT REPLICATION SLAVE ON *.* to 'replicate'@'192.168.1.204' 
identified by 'password'; 
Here, we're creating a replication user named 
replicate
 and allowing it to connect 
to our primary server from the IP address 
192.168.1.204
. Be sure to change that 
IP to match the IP of your secondary server, but you can also use a hostname 
identifier such as 
%.mydomain
 if you have a domain configured, which is equivalent to 
allowing any hostname that ends with 
.mydomain
. Also, we're setting the password 
for this user to 
password
, so feel free to customize that as well to fit your password 
requirements (be sure to make a note of the password).
We should now restart the 
mariadb
 daemon so that the changes we've made to the 
mysql.cnf
 file take effect:
sudo systemctl restart mariadb 
Next, we'll set up the secondary server. But before we do that, there's a consideration 
to make now that will possibly make the process easier on us. In a production 
environment, it's very possible that data is still being written to the primary server. 
The process of setting up a secondary server is much easier if we don't have to worry 
about the primary database changing while we set up the secondary. The following 
command, when executed within the MariaDB shell, will lock the database and 
prevent additional changes:
FLUSH TABLES WITH READ LOCK;
If you're absolutely sure that no data is going to be written to the 
primary server, you can disregard that step.


Chapter 13

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   441   442   443   444   445   446   447   448   ...   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