Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL 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 June 17th, 2004, 01:12 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can also take a look at this here.

Code:
mysql> INSERT INTO user (Host,User,Password)
    ->     VALUES('localhost','dummy','');



_________________________
-Vijay G
Strive for Perfection
 
Old June 17th, 2004, 01:28 PM
Registered User
 
Join Date: Jun 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For whatever reason the space appears to be removed automatically. But, things are working ok again for the user logging in.
I used Flush Privleges again. I deleted the user. Added the user again and defined the host as localhost, set a password and it worked; however, if I use the wildcard character % for the host name, the user still could not log in.
 
Old June 17th, 2004, 01:40 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Two of the accounts have a username of monty and a password of some_pass. Both accounts are superuser accounts with full privileges to do anything. One account ('monty'@'localhost') can be used only when connecting from the local host. The other ('monty'@'%') can be used to connect from any other host. Note that it is necessary to have both accounts for monty to be able to connect from anywhere as monty. Without the localhost account, the anonymous-user account for localhost that is created by mysql_install_db would take precedence when monty connects from the local host. As a result, monty would be treated as an anonymous user. The reason for this is that the anonymous-user account has a more specific Host column value than the 'monty'@'%' account and thus comes earlier in the user table sort order. (user table sorting is discussed in section 5.4.5 Access Control, Stage 1: Connection Verification.)

That should explain your doubt on '%' thing.

Cheers!

_________________________
-Vijay G
Strive for Perfection
 
Old June 17th, 2004, 08:46 PM
Registered User
 
Join Date: Jun 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That explains it. Thank you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
phpMyAdmin - #1044 - Access denied for user crmpicco PHP Databases 0 October 21st, 2007 09:32 AM
access denied for new user, Chapter 3 kanjigirl BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 5 February 19th, 2006 05:08 PM
ERROR 1045: Access denied for user: OBDC@localhost kara333 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 December 4th, 2005 07:57 AM
1044: Access denied for user '@localhost ... ajutla PHP Databases 3 April 16th, 2005 03:27 PM
Access Denied For User -Chapter 9 AMP_Engineer BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 5 September 25th, 2004 02:18 AM





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