Birmingham mumbai


part, it's best to pick one solution per server and stick with it. As a



Download 15,21 Mb.
Pdf ko'rish
bet428/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   424   425   426   427   428   429   430   431   ...   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)


part, it's best to pick one solution per server and stick with it. As a 
general rule, MySQL should be used if you have legacy databases 
to support. For brand-new installations, go with MariaDB.


Chapter 13
[
 329 
]
After you install the 
mariadb-server
 package, check to make sure the service started 
and is enabled. By default, it should already be running:
systemctl status mariadb 
Next, we'll want to add some security to our MariaDB installation (even though 
we're using MariaDB, the name of the following command hasn't been updated and 
still includes 
mysql
 in the name):
sudo mysql_secure_installation 
At this point, we haven't set a 
root
 password yet, so go ahead and just press 
Enter
 
when the script asks for it. This script will ask you additional questions. Next, it will 
ask you if you want to set a 
root
 password. The 
root
 user for MariaDB is not the 
same as the 
root
 user on your system, and you definitely should create a password 
for it. So when this comes up, press 
y
 to tell it you want to create a 
root
 password, 
then enter that password twice.
After setting the 
root
 password, the script will ask you whether you'd like to 
remove anonymous users, and also disallow remote access to the database server. 
You should answer yes to both. The latter is especially important, as there's almost 
never a situation in which allowing external access to MySQL/MariaDB is a good 
idea. Even if you're hosting a website for external users, those users only need access 
to the website, not the database server. The website itself will interface with the 
database locally as needed; an external connection wouldn't be necessary. Basically, 
just answer 
yes
 to everything the script asks you.
The entire process after executing 
mysql_secure_installation
 looks like the 
following:
Enter current password for root (enter for none): 
Set root password? [Y/n] 
Remove anonymous users? [Y/n] 
Disallow root login remotely? [Y/n] 
Remove test database and access to it? [Y/n] 
Reload privilege tables now? [Y/n] 
At this point, we officially have a fully functional database server. The previous 
command allowed us to apply some basic security, and our database server is now 
available to us. To connect to it and manage it, we'll use the 
mariadb
 command to 
access the MariaDB shell, where we'll enter commands to manage our database(s). 
There are actually two methods to connect to this shell. The first method is by simply 
using the 
mariadb
 command with 
sudo
:
sudo mariadb 


Managing Databases

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   424   425   426   427   428   429   430   431   ...   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