Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases 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 February 2nd, 2005, 03:42 PM
Registered User
 
Join Date: Aug 2004
Location: , , Canada.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default 1044: Access denied for user '@localhost ...

I have apache v1.3.27, PHP 4.3.2 MySQL 3.23.49 installed on Solaris.
The installation seems to be fine as i can successfully use mysqladmin, mysql commands to log onto my databases and do manipulation on the Solaris box.

But trying to access the database from Windows IE i get the following error:
1044: Access denied for user '@localhost'n to database 'name of database'.

Any help appreciated.
Thanks

Reply With Quote
  #2 (permalink)  
Old February 9th, 2005, 10:00 AM
Authorized User
 
Join Date: Jul 2004
Location: rajshahi, , Bangladesh.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajuru Send a message via Yahoo to rajuru
Default

during login you might not given any username

the syntax is
mysql_connect($dbhost,$dbuser,$dbpass);

you can try the following example but I am not sure whether it will work or not as I don't know ur username & password.

$handler=mysql_connect('localhost','root','');
if($handler) echo "Connection success"; else die(mysql_error());

Best Regard:
Md. Zakir Hossain (Raju)
www.rubd.net
www.xenex.rubd.net
www.forum.rubd.net
Reply With Quote
  #3 (permalink)  
Old March 8th, 2005, 05:01 PM
Authorized User
 
Join Date: Jul 2003
Location: , , .
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths
Default

ajuta,

execute mysql from the shell ( you indicated that it worked that way) and issue the following command:

GRANT ALL PRIVILIGES ON *.* TO 'user'@'localhost' IDENTIFIED BY 'password';

Alternatively, to par down permissions,

GRANT ALL PRIVILIGES ON <Database Name>.* TO 'user'@'localhost' IDENTIFIED BY 'password';

  This is a relatively common problem/mis-configuration. I just spent some time banging my head wondering why my code wasn't working when I rememberd I did that on the DEVELOPMENT server but not the PRODUCTION server. oops.

Regards,
Meredith Shaebanyan


Reply With Quote
  #4 (permalink)  
Old April 16th, 2005, 03:27 PM
Registered User
 
Join Date: Apr 2005
Location: miami, fl, USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, I did set up my password by using :
"set password for root@loacalhost=password('your_password');
log out "\q", and then log back with:
mysql -u root -p,
prompts for password! 'yourpassword'
and then I get the wellcome monitor screen.
then I make sure I place the same password in my PHP script, at hte
mysql_connect () function.
and I now get : Can't create database 'wiley'. Database exists.
My hole next week will be dvoted to this message NOW..
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
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 04: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 06:57 AM
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
Access denied for user wisconsin MySQL 13 June 17th, 2004 08:46 PM



All times are GMT -4. The time now is 07:27 PM.


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