Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6
This is the forum to discuss the Wrox book Beginning PHP, Apache, MySQLWeb Development by Michael K. Glass, Yann Le Scouarnec, Elizabeth Naramore, Gary Mailer, Jeremy Stolz, Jason Gerner; ISBN: 9780764557446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 8th, 2004, 10:16 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default MySQL password reset

I'm sure this has been asked before, but I cannot seem to find it. I set up my MySQL password incorrectly on page 23 and I cannot figure out how to change it to a new password.

Any help is appreciated.

Thanks

Todd
Reply With Quote
  #2 (permalink)  
Old August 9th, 2004, 01:03 AM
Authorized User
 
Join Date: Jul 2004
Location: Las Vegas, NV, USA.
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by tdewitt274
 I'm sure this has been asked before, but I cannot seem to find it.††I set up my MySQL password incorrectly on page 23 and I cannot figure out how to change it to a new password.

Any help is appreciated.

Thanks

Todd
Since you did not say what your operating system is I am assuming it is windows.

The procedure under Windows:
Log on to your system as Administrator.
Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager:

Start Menu -> Control Panel -> Administrative Tools -> Services
Then find the MySQL service in the list, and stop it. If your server is not running as a service, you may need to use the Task Manager to force it to stop.

Open a console window to get to the DOS command prompt:

Start Menu -> Run -> cmd

We are assuming that you installed MySQL to `C:\mysql'. If you installed MySQL to another location, adjust the following commands accordingly. At the DOS command prompt, execute this command:

C:\> C:\mysql\bin\mysqld-nt --skip-grant-tables

This starts the server in a special mode that does not check the grant tables to control access.

Keeping the first console window open, open a second console window and execute the following commands (type each on a single line):

C:\> C:\mysql\bin\mysqladmin -u root flush-privileges password "newpwd"

C:\> C:\mysql\bin\mysqladmin -u root -p shutdown

Replace ``newpwd'' with the actual root password that you want to use.

The second command will prompt you to enter the new password for access. Enter the password that you assigned in the first command.
Stop the MySQL server, then restart it in normal mode again. If you run the server as a service, start it from the Windows Services window. If you start the server manually, use whatever command you normally use.

You should now be able to connect using the new password.

Reply With Quote
  #3 (permalink)  
Old August 10th, 2004, 06:24 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your help! I saw someone post a link, but this was better!

Thanks again

Todd

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem MYSQL password() Function everetts PHP Databases 2 March 23rd, 2007 11:34 PM
MySQL Password and username Yee MySQL 2 November 1st, 2004 12:31 PM
Mysql auto_increment reset elmb Beginning PHP 2 August 3rd, 2004 07:22 AM
Changing password in MySql thegooner BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 May 24th, 2004 05:53 PM
reset password help nazra Classic ASP Databases 3 July 25th, 2003 09:24 PM



All times are GMT -4. The time now is 11:45 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.