MySQL - Create, Delete User Accounts and Grant Privileges (create/drop user, grant, show grants)

  Рет қаралды 25,901

Eli the Computer Guy

Eli the Computer Guy

Күн бұрын

Find code and diagrams at: www.EliTheComp...
MySQL has its own user accounts and security policies. Remember that most times “hackers” are only able to compromise a database using the privileges assigned to the compromised account.
CREATE USER ‘user’@’localhost’ IDENTIFIED BY ‘password’; - Create user with Password
DROP USER ‘user’@’localhost’ - Delete user
GRANT ‘permission’ on DATABASE.TABLE to ‘user@localhost’; - Grant privileges to user account
GRANT ALL PRIVILEGES ON . TO ‘user’@’localhost’; - Gives all permissions to ALL tables on ALL databases to user
GRANT ALL PRIVILEGES ON . TO ‘user’@’localhost’ WITH GRANT OPTION; - “with grant option” gives ability for account to give privileges to other accounts.
GRANT ‘permission'(column1,column2) on DATABASE.TABLE to user@localhost; - Grants privilege to columns in a table.
show grants; - shows privilege of current user
show grant for user; shows privilege for a specific user
select user, host from mysql.user; - display users and hosts for MySQL Server
REVOKE ‘privilege’ on DATABASE.TABLE FROM user@localhost;
mysql -u username -p - Login to MySQL from Linux
Privileges:
ALL PRIVILEGES - grants all privileges to the MySQL user
CREATE - allows the user to create databases and tables
DROP - allows the user to drop databases and tables
DELETE - allows the user to delete rows from specific MySQL table
INSERT - allows the user to insert rows into specific MySQL table
SELECT - allows the user to read the database
UPDATE - allows the user to update table rows
Full list of Privileges: dev.mysql.com/...

Пікірлер: 32
@killer909Y
@killer909Y 4 жыл бұрын
Taking a database class in college and the textbooks's exercises are complicated so I'm glad to have this series so I can have a better foundation. I also feel like you do a great job of explaining what real world situations you could find yourself in when interacting with databases.
@oscarmartinlive
@oscarmartinlive 4 жыл бұрын
I love the way you talk. Your flow of knowledge is engaging. The entrance is dope!
@citoldyou
@citoldyou 4 жыл бұрын
Thank you Eli for being there and being a great teacher
@marinasha2949
@marinasha2949 3 жыл бұрын
Eli you are so good!!! "Good security is a by-product of good administration." (by Eli) That`s very refreshing.
@manojsaravanan3824
@manojsaravanan3824 3 жыл бұрын
Finally found a another great teacher on the internet!!
@fupreblog5756
@fupreblog5756 2 жыл бұрын
The best security tip ever for a web developer using mysql
@rosaramirez8246
@rosaramirez8246 3 жыл бұрын
I love the way you explained everything. So easy to understand. Thank you.
@TomicaCZ
@TomicaCZ 4 жыл бұрын
Daaaaamn.... finally somebody who can actually do a proper informative video! Great job sir :) I learnt a lot, so thank you very much. btw your diction is awesome :D It might sound stupid, but it really helps to focus on all the information
@budcostagingloginbudcostag3048
@budcostagingloginbudcostag3048 3 жыл бұрын
best linux guy on youtube hands down. Knows his stuff
@tonis864
@tonis864 4 жыл бұрын
Eli you are the best, greetings from Macedonia!!!
@christophernolan8761
@christophernolan8761 4 жыл бұрын
Great video. I appreciate the best practices commentary. Also, how about showing the computer use using MySQL Workbench?
@jiayan9675
@jiayan9675 Жыл бұрын
amazing lesson!clearer than our school lecturer🎉
@nguye1971
@nguye1971 4 жыл бұрын
Great learning. Thx Eli
@joperez1980
@joperez1980 4 жыл бұрын
Greetings from Mexico, you're the best!!!
@HarshSoni-x3j
@HarshSoni-x3j 4 ай бұрын
Sir Eli, Greetings from India!!!
@anasofiaalves3937
@anasofiaalves3937 4 жыл бұрын
thank you so much for this video
@outofahat9363
@outofahat9363 2 жыл бұрын
17:24 perfect comedic timing 🤣
@HowTo-nr7uk
@HowTo-nr7uk 3 жыл бұрын
Who else thought why jason statham here?? 🤣
@oscarmartinlive
@oscarmartinlive 4 жыл бұрын
I had to subscribe immediately
@marcelomafra
@marcelomafra 4 жыл бұрын
Very good man.
@VictorVii
@VictorVii 4 жыл бұрын
Took some time off the channel, I need to catch up with awesome new content!
@gaurabroy4738
@gaurabroy4738 3 жыл бұрын
Sir, while creating user an error is coming that error creating account newuser@%: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BY' password" at line 1
@uberfastross4348
@uberfastross4348 4 жыл бұрын
I have accidently deleted all the users. Now receiving an error and wont let me connect to phpmyadmin? Any help would be greatly appreciated
@bebomohamed8860
@bebomohamed8860 4 жыл бұрын
thank you so much
@shamiks4976
@shamiks4976 3 жыл бұрын
Loved it!!!
@itprof7895
@itprof7895 3 жыл бұрын
Loved it
@baruthiwagikuyutv
@baruthiwagikuyutv 4 жыл бұрын
good stuff
@this_rishi
@this_rishi 3 жыл бұрын
grrreat!!
@sandeshtimalsina
@sandeshtimalsina 3 жыл бұрын
DOPE
@tawonganhende6007
@tawonganhende6007 2 жыл бұрын
👏
MySQL - Table Joins Introduction (inner join)
21:54
Eli the Computer Guy
Рет қаралды 6 М.
MySQL - MySQL Introduction
39:46
Eli the Computer Guy
Рет қаралды 34 М.
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 108 МЛН
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 52 МЛН
MySQL - Backup, Restore, Copy Tables and Databases
41:31
Eli the Computer Guy
Рет қаралды 12 М.
Galera Cluster Tutorial: Building a Highly Available Database System
19:31
Daniel Persson (Kalaspuffar)
Рет қаралды 7 М.
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 79 М.
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,5 МЛН
MySQL - Structure Introduction
41:16
Eli the Computer Guy
Рет қаралды 10 М.
Creating and granting permission to MySQL users
9:15
David Dalton
Рет қаралды 18 М.
MySQL - PHP Prepared Statements
26:26
Eli the Computer Guy
Рет қаралды 10 М.
Что лучше ноутбук или ПК в бюджете 100к?
0:34
Hardware tools repair tool high performance tool
0:16
Hardware tools
Рет қаралды 3,5 МЛН
iOS 18 в реальной жизни
14:42
HUDAKOV
Рет қаралды 196 М.
Breaking Leptop in Every Possible Way! 💻💔" #shorts
0:52
Light Movies
Рет қаралды 2,1 МЛН
Evolution of the Samsung Galaxy
0:50
ios_aesthetics
Рет қаралды 7 МЛН
Кто-то еще помнит про эту консоль?
0:51
ПРОСТО ЛЕШКА
Рет қаралды 1,5 МЛН