Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 8th, 2004, 10:16 AM
Registered User
 
Join Date: Jul 2004
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
 
Old August 9th, 2004, 01:03 AM
Authorized User
 
Join Date: Jul 2004
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.

 
Old August 10th, 2004, 06:24 AM
Registered User
 
Join Date: Jul 2004
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






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 01: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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.