Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/content/86/3464586/html/rkWebsites/allfree-stuff.com/conn.php on line 11
allfree-stuff.com - Free Tutorials, Ebooks, Source Codes, Question Bank
Logo Tutorials, Ebooks, Source Codes, Question Bank
Submit your Email ID & receive intimation about New/Updated Contents :
Advertise with us             CONTACT US
 
Android MobilesHTC MobilesMicromax MobilesMobile ArticlesMobile TermsNokia MobilesSamsung MobilesSony MobilesTablets
108 Names of GodBhajans CHALISA CollectionDevi Maa Ki AartiyanGanesh Ji Ki AartiyanHanuman Ji Ki AartiyanRadha Krishan Ji Ki AartiyanRam Ji Ki AartiyanSai Baba Ji Ki AartiyanShiv Ji Ki AartiyanTemples in IndiaVishnu Ji Ki Aartiyan
Wallpapers Pack
Bollywood FlashsFestival FlashsFlash GamesFlash MessagesFunny FlashsPatriotic FlashsPolitical FlashsSpiritual Flashs
FunStuffJokesRajnikanth JokesWhats App JokesWhats App Messages
About IndiaGeneral Knowledge Hindi RhymesMythological StoriesNursery RhymesPatriotic SongsRiddlesShort StoriesTongue Twisters
Funny SlideshowsInteresting SlideshowsMessage SlideshowsNice SlideshowsPatriotic SlideshowsSpiritual Slideshows
BirthDay SMSChristmas SMSClassic SMSFathers Day SMSFestivals SMSFriendship SMSFunny SMSHoli SMSHusbandWife SMSIndependenceDay SMSLohri SMSLove SMSMorning SMSMothers Day SMSNew Year SMSNight SMSPoetry SMSPunjabi SMSRakhi SMSSanta Banta SmSTeachers Day SMSTimePass SMSValentine Day SMS
3D WallpapersAbstract_WallpapersAnimated_WallpapersApple_Mac_WallpapersBaby_WallpapersBackGroundsBeach WallpapersBirds WallpapersCars WallpapersCartoon_WallpapersChristmas WallpapersColorFul_WallpapersColoringSheetsCool_WallpapersFish_WallpapersFlagsFlash TattoosFlowersFunny WallpapersGalleryGodsGreen_ScenesHD_High_ResolutioniPhone WallPapersLinux_WallpapersMobile_WallpapersMortality WallpapersMountain_WallpapersNatureOptical_IllusionsRosesSea_WallpapersShips WallpapersSports_GamesUltraBeautiful WallpaperValentine WallpapersVehiclesWideScreen WallpapersWildLife WallpapersWindows VistaWindowsXPWindows_7_Wallpapers
AJAX ASP.Net 2.0/3.5 C# / C-Sharp C/C++ Cryptography Data Compression Data Structures FLASH Foxpro/VFP HTML JAVA Java Scripts JSP LINUX Microsoft Office Microsoft Windows MS XNA PHP/MySQL Silverlight Software Engineering SQL SQL Server 2005 UNIX VB.Net 2005 VBScript XML

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/content/86/3464586/html/rkWebsites/allfree-stuff.com/conn.php on line 11
Home Search

?>
       
  
PHP/MySQL
Articles
Changing MySQL root user password using mysql sql command

 

Changing MySQL root user password using mysql sql command

This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user kamal:

1) Login to mysql server, type following command at shell prompt:

$ mysql -u root -p

2) Use mysql database (type command at mysql> prompt):

mysql> use mysql;

3) Change password for user kamal:

mysql> update user set password=PASSWORD("NEWPASSWORD") where User='kamal';

4) Reload privileges:

mysql> flush privileges;
mysql> quit

This method you need to use while using PHP or Perl scripting.








allfree-stuff.com - Free Education for ALL - for any queries contact @ webmaster@allfree-stuff.com