PHP Installation
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsPHP RelatedPHP Installation

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old July 3rd, 2006, 07:18 PM
windyweather windyweather is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Coos Bay, OR, USA
Posts: 2 windyweather User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Access Denied: mysql5 php5

SUSE 10.1
PHP Version 5.1.2
MySQL Client API version 5.0.18
Apache/2.2.0 (Linux/SUSE)

I can't get php5 to connect to mysql 5. With or without a password.

<html><body><h1>Test MySQL Database connection</h1>
<h2>
<?php
// (1)
//$mysql= new mysqli("localhost", "galewpuser", "galewppass", "galewp");
// (2)
$mysql= new mysqli("localhost", "galewpuser", "", "galewp");
printf("Error: %sn", mysqli_connect_error());
?>
</h2>
</body></html>



results of (1) with the correct password set with MySQL Administrator are
Error: Access denied for user 'galewpuser'@'localhost' (using password: YES)

results of (2) with password set to "" are
Error: Access denied for user ''@'localhost' to database 'galewp'

all privs are granted between galewpuser and the galewp database
no other privs are granted between galewpuser and any other catalogs.

I had this working on WinXP with php4 and mysql4 and had to use OLD_PASSWORDS to make it work. I understand that OLD_PASSWORDS are history in these "5" days.

Thanks,
ww

Reply With Quote
  #2  
Old July 3rd, 2006, 07:53 PM
windyweather windyweather is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Coos Bay, OR, USA
Posts: 2 windyweather User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
And the ANSWER IS!!

And the answer is that you have to add @localhost to the list of hosts explicitly @%, which is a wildcard and you would think would include localhost, apparently does not.

* So, under the username in MyAdmin / Users panel, select the user you want to change, right click and choose Add Host.
* Then choose Localhost
* then be sure and update the privs to include all the privs for the desired database's.


hummm.....
Yep, you would think that WILDCARD meant WILDCARD including LOCALHOST but it apparently does not.

sigh.

ww

Reply With Quote
Reply

Viewing: Codewalkers ForumsPHP RelatedPHP Installation > Access Denied: mysql5 php5


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway