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 June 12th, 2004, 09:55 AM
Registered User
 
Join Date: Jun 2004
Location: , , United Kingdom.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 1, Page 23

Hi

i'm a complete newbie on this subject and i've got an error when running the command c:\mysql\bin\mysql mysql

The error i get is: ERROR 1044: Access denied for user: '@localhost' to database 'mysql'

Can anyone help me solve that problem.

I'm running on Windows XP and using mysql version 4.0.2a

Thanks

Reply With Quote
  #2 (permalink)  
Old June 12th, 2004, 05:21 PM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try using mysql>mysql -u root

I'm not sure why you are getting that error - I don't get the error myself.††But if you use the root username, you should be able to get into mysql and start mucking around with the databases.
Reply With Quote
  #3 (permalink)  
Old June 16th, 2004, 12:42 PM
Registered User
 
Join Date: Jun 2004
Location: , , United Kingdom.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I managed to solve my problem.

I switched to an older version of mysql, version 4.0.15a instead of the current release of 4.0.2a and it works fine.

Thanks

Paul

Reply With Quote
  #4 (permalink)  
Old June 24th, 2004, 07:37 PM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A better solution than using old MySQL versions:

Connect as root using the following command:
mysql -u root -p mysql

After this the prompt will ask you for a password which is set to 'root' as default in newer versions of MySQL. Like this:

-------------------------------------------------------------------
C:\mysql\bin>mysql -u root -p mysql
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5 to server version: 4.0.20a-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
-------------------------------------------------------------------

You can set the password for individual databases by using the 'update' command:

-------------------------------------------------------------------
update mysql.user set password='wrox' where user='root'
-------------------------------------------------------------------

This will change 'wrox' as a password for root user.

(Thx to anand_smart@http://forums.devshed.com)
Reply With Quote
  #5 (permalink)  
Old June 29th, 2004, 01:20 PM
Authorized User
 
Join Date: Jun 2004
Location: London, , Canada.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok I am having the same problem and I did what you said but that password wouldn't let me in. I am using veriosn 4.0.20a. Thanks

Reply With Quote
  #6 (permalink)  
Old July 7th, 2004, 07:07 PM
Authorized User
 
Join Date: Jun 2004
Location: New York, New York, USA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to redcell184
Default

I am getting the same error message and i have tried all the availabel options. i am running mysql-4.0.20d on windows xp home edition.

Reply With Quote
  #7 (permalink)  
Old July 8th, 2004, 01:09 PM
Authorized User
 
Join Date: Apr 2004
Location: Cincinnati, OH, USA.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

At the C:\> prompt, type:

c:\> c:\mysql\bin\mysql mysql -u root

(This is a change in the newer versions of mysql.) Now you can continue and Delete the default users, and set the pass for the root. Another change you will encounter is in #3 after deleting the user, you now need to type:
c:\> c:\mysql\bin\mysqladmin -u root reload

Again, this is a change for the newer versions of mysql and will be addressed in the second edition of the book.

Hope that helps.

-Elizabeth Naramore

Reply With Quote
  #8 (permalink)  
Old July 9th, 2004, 12:12 AM
Authorized User
 
Join Date: Jun 2004
Location: New York, New York, USA.
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to redcell184
Default

now after doing that step and following some other ones that are in the posting i get this message:


c:\mysql\bin> mysql -u root mysql
access denied

i do not have a clue why it would say that.

thank you for you help!!!!
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
Chapter 23 chapter23.xml and TOMCAT I5commuter BOOK: Beginning JavaServer Pages 0 May 22nd, 2008 09:05 AM



All times are GMT -4. The time now is 08:19 AM.


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