13, May 2008

How to change root password in mysql - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  Databases  >  MySQL
Topic: How to change root password in mysql
« previous next »
Pages: [1] Print

Author Topic: How to change root password in mysql  (Read 519 times)
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7823
39873 credits
Members referred : 3



« on: Oct 24, 2006, 05:01:53 PM »

Recently I was trying to find out how to change the root password on my mysql server with no luck, so after some tweaks and searches I finally managed to make it work.

I know this sounds rediculous to a sysadmin, but I am just a poor php developer Smiley

Anyway bellow is the way to do it using only SQL statements so you can do it even using an interface like phpMyAdmin.

Bellow are the two SQL statements that you need to change any user's password (including the root user)

Code:
UPDATE user SET password=PASSWORD("here-goes-the-new-password") WHERE User='root';
FLUSH PRIVILEGES;

Those statements must run in the mysql database so from phpMyAdmin you have to select this db, or from console you have to do this :

Code:
connect mysql;

Trial and Error my two best teachers Cool
Promote your blog for free.... Visit through proxy

Last blog : Keep it Legal - Tims guide to legal notices
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=4544
Tags : php mysql php my admin databases Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  Databases  >  MySQL
Topic: How to change root password in mysql
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 13, 2008, 01:27:48 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 34.929
Total Topics: 7.262
Total Members: 3.479
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: mileymo1

27 Guests, 3 Users online :

12 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.