Birmingham mumbai



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

[
 330 
]
This particular command works because if you use the 
mariadb
 command as 
root
 
(we used 
sudo
 in this example) the password is bypassed. In fact, we didn't even 
enter the username either
root
 is assumed if you are attempting to access MariaDB 
with 
sudo
. This is by far the simplest way to connect. However, some of you may 
be accustomed to a different method of authentication if you've used other Linux 
distributions: entering the username and password. In that case, the command will 
look like this (it won't work by default though):
mariadb -u root -p
When that command works correctly, it will ask you for your 
root
 password and 
then let you into the shell. However, by default, the 
root
 user is set up to use a 
completely different mode of authentication altogether (Unix sockets) and this will 
fail with the following error (even if you enter the correct password):
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
You have two options for dealing with this. First, you can simply use 
sudo mariadb
 
to access the MariaDB shell and not use the other method. Doing so is perfectly valid, 
and there are no downsides as it gives you the same level of access. If you prefer to 
access the 
root
 account via the traditional means (by providing the username and 
password for the 
root
 user) you'll need to change the 
root
 user to use the native 
password authentication method instead. To do so, first access the MariaDB shell 
and then enter these two commands:
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE 
USER='root';
FLUSH PRIVILEGES;
Now, you'll be able to access the MariaDB shell as root with native authentication:
mariadb -u root -p
It's recommended to create a different user in order to 
manage your MariaDB installation, as logging in to root is not 
recommended in most cases. We'll be creating additional users 
later on in this chapter, but for now, the root account is the only 
one we have available at the moment. It's common practice to use 
the root account to do the initial setup, and then create a different 
user for administrative purposes going forward. However, the root 
account is still often used for server maintenance, so use your best 
judgment.


Chapter 13

Download 15,21 Mb.

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