21, July 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 563 times)
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7970
40777 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
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
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?
Jul 21, 2008, 01:10:19 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: 35.669
Total Topics: 7.373
Total Members: 3.694
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: jinous@webdco.com

24 Guests, 4 Users online :

6 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.