Birmingham mumbai



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

[
 347 
]
The output should be similar to the following:
tcp   LISTEN 0      80                               0.0.0.0:3306       
0.0.0.0:*            users:(("mysqld",pid=9768,fd=23)) 
If you see that the service is listening on 
127.0.0.1:3306
 instead, that means it's only 
accepting connections from localhost. Earlier in this section, I mentioned changing 
the 
bind
 address in the 
/etc/mysql/mariadb.conf.d/50-server.cnf
 file. Make sure 
you've already done that and restart 
mariadb
. During my tests, I've actually had one 
situation where the 
mariadb
 service became locked after I made this change, and 
attempting to restart the process did nothing (I ended up having to reboot the entire 
server, which is not typically something you'd have to do). Once the server came 
back up, it was listening for connections from the network.
If you receive errors on the secondary server when you run 
SHOW SLAVE STATUS \G

with regards to authentication, make sure you've run 
FLUSH PRIVILEGES
 on the 
primary server. Even if you have, run it again to be sure. Also, double-check that 
you're synchronizing with the correct username, IP address, and password. For your 
convenience, here's the command we ran on the primary server to grant replication 
permissions:
GRANT REPLICATION SLAVE ON *.* to 'replicate'@'192.168.1.204' 
identified by 'password'; 
FLUSH PRIVILEGES 
Here's the command that we ran on the secondary server:
CHANGE MASTER TO MASTER_HOST="192.168.1.184", MASTER_USER='replicate', 
MASTER_PASSWORD='password'; 
Finally, make sure that your primary database and the secondary database both 
contain the same databases and tables. The primary server won't be able to update 
a database on the secondary server if it doesn't exist there. Flip back to my example 
usage on 
mysqldump
 if you need a refresher. You should only need to use 
mysqldump
 
and import the database onto the secondary server once, since after you get the 
replication going, any changes made to the database on the primary server should 
follow over to the secondary. If you have any difficulties with the 
mysqldump
 
command, you can manually create 
mysampledb
 and the 
Employees
 table on the 
secondary server, which is really all it needs for synchronization to start.
Synchronization should then begin within a minute, but you can execute 
STOP SLAVE

followed by 
START SLAVE
, on the secondary server to force it to try to synchronize 
again without waiting.


Managing Databases

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   444   445   446   447   448   449   450   451   ...   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