General SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesGeneral SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 25th, 2003, 01:43 PM
movado movado is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Posts: 1 movado User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Cannot connect_Access Denied

Hi Iam very new to this and don't know very much about mysql but would like to learn but I cannot seem to get everything working right. Ihave set up apache which is working and php which is working and also msql but whenever I try to access mysql i get
Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'xxxx@127.0.0.1' (Using password: YES) in c:\public_html\test.php on line 3
I set the username and password in the Mysql admin do I need to set the password elsewhere? Not sure if I have layed out enough info if not I can explain more. Thanks for any help

Reply With Quote
  #2  
Old February 26th, 2003, 06:55 AM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
try using the following code to connect to your database

$dbConn = mysql_connect("localhost","root");

Reply With Quote
  #3  
Old March 19th, 2003, 05:54 AM
trinh trinh is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 7 trinh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
$dbConn = mysql_connect("localhost","root");


I couldnt connect to mysql server with the above code
Web server returned the following error:
Quote:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /webroot/thu/database.php on line 2


But the code $dbConn = mysql_connect("172.16.4.1","root") is OK (the connect is suscessfull)
Could you tell me why ?

Ive Installed RedHat Linux7, Apache, PHP4.01, mySQL (rpm files included in RedHat Linux7 CDs) on the same server.

Reply With Quote
  #4  
Old March 21st, 2003, 11:53 AM
ihsanart ihsanart is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 2 ihsanart User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
check apache.conf

search for localhost or 127.0.0.1 in ur config file

it seems that you ' ve set your server to work online (with a constant IP)
pointing ur browser to URL(your IP)/phpinfo.php might help u get more info about ur settings

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesGeneral SQL Development > Cannot connect_Access Denied


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 3 hosted by Hostway
Stay green...Green IT