Sothingssuchasbeingabletocreate a databaseisbeingabletodeletedatabasesbeingabletoearninsertroseandcertainrecords, thattypeofthing, thoseair, alldifferentpermissionsthatyoucaneitherassigntousersorbeabletodenytousers.
So I'm goingtoshowyoutheshowofGrant's commandjusttoverifyifyou'regoinginandyou'retryingtocreate a databaseordelete a databaseandyourunintosomekindofaccessdeniedissue, Uh, justtobeabletodotheshowgrantsandseeifyouhavethepermissionstodowhatyouthinkyou'resupposedtodo.
So, as I saidinthepreviousvideo, and I'm sure I willsayinmanymorevideosinthisSiri's a warning.
A warning.
WillRobinson.
A warning, A warning.
Sothiswholemysequelsyrizaprobablygoingtodo a lotofwarningsjusttoexplaintoyoufolks, especiallyanyoftheoldtimersouttheremaybetryingtoteachthingsandsomethingthatmayseemlike a bitof a convolutedway, but I'm actuallytryingtoteachyouthisandwhat I thinkwillbethesimplestwayforpeopletolearn.
S sowhenwegointodayandweactuallystartdealingwiththedatabases, we'regonnacreate a databasetoleavethedatabaseandshowgrantsweregoingtobe a longandsimplyusingthepseudocommandformySequelsaregoingtosuedoupmysequelandthatwilldropusinasliterallytherootleveluserforthemysequelserver.
I'm doingthatbecause I havenotyetshownyouhowtocreateuseraccountswithinmysequel.
And I don't actuallywanttodothatclassuntil a fewclassesdowntheroad.
Sobasically, today, when I'm gonnabeshowingyouin, thisishowtogoinagainusingpseudomysequelthatwilldropusinattherootlevelformysequelThatwillallowustocreate a databasethatallowstodelete a databaseallowstodothisshowgrantscommand.
I willactuallyalsocreate a useraccountjusttokindofgiveyou a bitofanexamplethere.
Andsotryingtofigureouthowtopositionallofthosethingscouldbe a bitcomplicated.
Soalso, ifyou'refollowingalongwiththisparticularclassandyouhave a useraccountthathasallprivilegesfor a databaseserver, byallmeansloginusingthatparticularaccountagain.
Sohereweareatmymysequel, a labserverthat I'vecreated S so I figurethatgoingthrough a bunchofdesktop 18.4 againthedesktopthatusesthegraphicaluserinterfacethatwillbethebestwaytogofortheseparticularclasses.
Again, I havethisrunningin a virtualmachineonvirtualboxonmyMacbookProButifyouinstallthisdirectlyontobaremetal, thatwouldbefine, too, sothatletsgodown, clickonthelittleshowapplications.
Ifyouhave a normaluseraccountalready, whatyoudoisyoudomy C coolspacehyphenyouspaceaccountname, spacehyphen P.
Andthatishowyouwouldnormallylogintomysequel.
Butthatwillbeforthefuture.
Thatwillbeforthefuturerightnow.
Thisishowwe'regoingtologin.
Yougonnaaskmeforthepassword?
Supersecret.
123456 Password, Inner.
Andthereyougo.
I dohavetosayoneofthenicethingsaboutrunningmysequelon a localmachineversuslearningthisstuffuponsomekindofcloudhostingprovideristhatyoucoulddothingslikehavereallycrappysecurity.
Becausewhen I'm donewiththisclassandliterallyshutoffthevirtualmachineAndtherefore, itisnot a securityvulnerabilityformynetworkorformysystems.
Right?
Soif I If I deploymysequeluponto a cloudserver, I usereallycrappypathusernames, reallycrappypasswords.
I connectsomePHPscriptsto a right.
A hackermightbeabletofindthatandbeabletohave a lotoffunatyourexpense.
Oneofthenicethingsaboutspinningusuplocallyagain.
Assoonas I amfinishedwiththisclassormylad, Whatever I'm doing, I literallyturnoffthevirtualmachine, andthereisnolonger a vulnerabilitythere.
Uh, sojustoneofthosethingstobethinkingaboutnow, thefirstthingthatwe'regoingtodoiswe'reactuallyuse a command.
Soifyoulogin, yougotocreate a databaseunittodrop a databaseandforsomereasonyou'renotabletodoit.
YougetaccessdeniedagainstthenewshowgrantsandyouwillseewhatprivilegeswhatgrantsyouactuallyhaveSowiththat, whatwe'regonnadonowisjust a littlebitofextracredit.
Donotfeellikeyouhavetotakeanynotesoranything.
We'regoingtotalkaboutthiskindofstuff, Mawr.
Inthefuture, we'llhave a specificclassoncreatingusersandallthatkindofthinginfuture.
Socreateddatabase, andwe'rejustgoingtorecreatetest D B semicolon.
Okay, onerowaffected.
Wegobacktoshowedat a baseisokay, sowecannowseethatwe'vegotthenormaldefault, andthenwehavethetestdatabasethere.
Thenextthingthey'regonnadoisclearthescreen s o.
I likeclearingthescreeninordertoteachyoufolks.
Howthisisdone.
Makeslife a littlebiteasierformeonthisparticularcomputer.
If I typecontrol l thatwillclearthescreenforme, uh, foryouonyourparticularsystem.
Youmayjusthavetodo a bitof a Googlesearch, buttryandcontrol l atfirst, trycontrolelementfromtheirnewghoulsoryouneedtoclearthescreen.
Sonowthatwehavethetestdatabase, we'regoingtocreate a userbeinggivethatusersomeprivilegessothatwecanthenusetheshowgrantscommandtoseewhatprivilegesthatparticularuserhasagain, donotfeellikeyouhavetotakeanynotesathome.
Dropiswhatyouusetodeleteusers, theleaddatabases, theleaguetables s Sothat's justonethingjusttokeepinmind.
Ifyou'relike, oh, howdo I deletesomething?
Justremember, youalmostalwaysusedtodrop.
Nowthat's whatwe'regoingtouse.
Createuser.
Uh, we'regonnacreate a usercalledTim.
SosinglequotationMarkTinClose.
Singlequotationmarkidentified.
Sure, I spellthatright.
BySobasicallywhatthey'resayingwith a passwordof 123456 Right?
Soagain, don't don't worryabouttakingnotes.
Willdoallofthislater, butwe'recreating a userSinglequotationmarks, Timclosingquotationmarksidentifiedbythissays, andwith a passwordofsinglequotationMark.
Sowhatif I wanttocreate a database, uh, likenew d B.
Right.
Andthen I docynicalandsocreatedatabasenewDVDs.
I'm simplycreated a databasejustlikeitwasbeforeNowenter.
Ooh!
Error.
Error.
WillRobinsonaccessdeniedfor 10 todataVanceknew d B.
And I'm like, huh?
Whyisthat?
So I coulddoshowgrantslike I didbefore, Semicolon.
Andthenifyouowe, I onlyhavetheinsertprivilegeontest D B forallallthetablesontestTV.
I don't havetheabilitytocreate a databasewithinthisparticularparticularmysequelserver.
Andso I needtogoandasktheadministratororfiguresomethingelseout.
If I havetobetocreate a database s O.
Thatis a just a basicexplanationthereofhowyoucancreateanatomyisyou'regonnadropitat a base, andthenyoucanseetheprivilegestoseeifyouhavetherighttoeithercreateordeleteddatabasewithinmysequel.
Andsothereyougo.
Nowyouknowhowtocreate a databasedeleteddatabaseandbeabletoseeprivileges.
Nowyouprobablydon't realizeisathomebecausehopefully I didthosejumpcutsprettywell.
You'retryingtotypeinthecommandsandyoukeepscrewingupthecommands, evenevenusprofessionalsduetothedifferencebetweenmeandyouis I gettojump, cutoutalltheerrorsyou'resayingthey'reforcedtoseeyours.
Andnow I makethatjokeaboutdeletingthe C R M databaseandyou'resittingtherelike, yeah, youknow, somecompanywouldlike, I don't know, maybe 1,000,000 customersorwhatever.
Thatwouldbe a badthing.
I actuallyhad a buddyofmine.
I actuallyhad a buddyofmine.
HereallydiddothatReallydiddothat.
Shewasworkingabout 100 hours.
Oneofthereasonswhyyoudon't work 100 hourweeks.
I knowit.
I knowitsoundsreallycool.
Allthesepeoplelike, yeah, I work 100 hourweeksdon't work 100 hourweeks.
Sir, that's not a jokewhenwe'retalkingaboutagain, we'renottalkingabout 1000 1000 customers.
Theyhadmillionsofcustomers.
Shewillmakeitoutthe C R M.
For a prettysizablecompany, theywillabletheywereabletorecoverfrom a backup.
Butwhenyouwerekindofrainfromthatsizeof a backup, andittookabouttwodays, basicallyimaginethe C R M solutionfor a companywithmillionsandmillionsandmillionsofcustomersgoingbyebyefor a coupleofdays.
Thatwas a badthing.
Andsoagain, when I when I talkabouthoweasyitistodosomethingliketolead a databaseandit's like, Oh, uh, that's notreallyhotOh, there's nothing.
Sosadiswatching a womanwho's workedon 100 hoursfor a coupleof a coupleofweeksin a row, andthenshehas a meltdownbecauseshewipedouttheentiredatabase, andthenandthenit's alsofunny.
Youstartknowingstupidafter 50 or 60 hours, andthenyoucoulddothingslikewhitedatabaseformillionsandmillionsofcustomers.
Soanyways, dobecarefulwiththat.
Andsothat's again.
Thisisbasically a littlebitgettingandstartingtogetyourfeetwetwithanactualofmysequeldatabaseserveraswegoon a littleteacher, haveyoumorethingsagainwiththewholeuseraccountthingrightnowhavingyoualonginas a pseudomysequel.
Then I'llshowyouhowtocreateuseraccountson, and I thinkit'llbe a littlebiteasier.
Everythingwillcomeintoplace a littlebitbetterthancreate a useraccountsinthebeginning.
I thinkit's mystyleteacher.
Yeah, we'llseehowitworksout.
Soanyways, asalways, I enjoyedat, uh, takingthisquestandlookforwardtothenextone.
Apparently, thetypeofcontentyoujustsawisnotwhatSusan W.
WantsforthefutureofYouTube.
ThismeansthatrecommendationsbyYouTubetothischannelhavedroppedmassively, andviewsarebecoming a comicallysmall I hatetoask.
I usedtosay I wouldneverask, butifyoucouldsubscribelikecommonandmostimportantly, sharethevideosthatyouappreciate, thatmayhelpslowthedeathofthischannel.