Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet436/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   432   433   434   435   436   437   438   439   ...   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)

[
 335 
]
Alternatively, we can use the following command as a normal user to switch to 
root

without using 
sudo
:
mariadb
Once inside the MariaDB shell, your prompt will change to the following:
MariaDB [(none)]> 
Now, we can create our new administrative user. I'll call mine 
admin
 in my examples, 
but you can use whatever name you'd like. In a company I used to work for, we 
used the username 
velociraptor
 as our administrative user on our servers, since 
nothing is more powerful than a velociraptor (and they can open doors). Feel free 
to use a clever name, but just make sure you remember it. Using a non-standard 
username has the added benefit of security by obscurity; the name wouldn't be what 
an intruder would expect.
Here's the command to create a new user in MariaDB (replace the username and 
password in the command with your desired credentials):
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
With the preceding commands, we're creating the 
admin
 user and restricting it to 
localhost
. This is important because we don't want to open up the 
admin
 account 
to the world. We're also flushing privileges, which causes MariaDB to reload its 
privileges information. The 
FLUSH PRIVILEGES
 command should be run every time 
you add a user or modify permissions. I may not always mention the need to run this 
command, so you might want to make a mental note of it and make it a habit now.
When it comes to MySQL syntax, the commands are not case 
sensitive (though the data parameters are), but it's common to 
capitalize instructions to separate them from data. During the 
remainder of this chapter, we'll be executing some commands 
within the Linux shell, and others within the MariaDB shell. I'll let 
you know which shell each command needs to be executed in as 
we come to them, but if you are confused, just keep in mind that 
MariaDB commands are the only ones that are capitalized. 


Managing Databases

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   432   433   434   435   436   437   438   439   ...   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