Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

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 April 18th, 2004, 03:19 AM
phpman phpman is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 33 phpman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to phpman
Connection with mysql problem

I have mysql installed in my local computer and I am trying to connect to it by doing the following:

php Code:
Original - php Code
  1. <?
  2.  
  3. $connection = mysql_connect ("localhost", "test", "testing") or die ("Couldn't connect to Data");
  4. if ($connection) {
  5.     echo "Succes";
  6. }
  7. ?>


But i get the following error:

Quote:
Warning: mysql_connect(): Access denied for user: 'test@localhost' (Using password: YES) in Crogram FilesApache GroupApache2htdocstestdatabasedb_connect.php on line 3
Couldn't connect to Data


I also have another hosting which has mysql installed in, but i can't connect. I get an error saying access denied.

Any help would be great, thanks

Reply With Quote
  #2  
Old April 18th, 2004, 04:38 AM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: Connection with mysql problem

Are you sure that the username and the password are correct??

Reply With Quote
  #3  
Old April 18th, 2004, 05:28 AM
phpman phpman is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 33 phpman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to phpman
RE: Connection with mysql problem

How would I check how many users I have through prompt anyway?

I am sure I created these usernames, cause a book told me to follow certain instructions.

Reply With Quote
  #4  
Old April 18th, 2004, 06:33 AM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: Connection with mysql problem

You can run this query on mysql prompt..

mysql> SELECT Host, User FROM mysql.user;

Reply With Quote
  #5  
Old April 18th, 2004, 06:41 AM
phpman phpman is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 33 phpman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to phpman
RE: Connection with mysql problem

I ran that and I do see the user.

I think it has to do with privalages, do you thinks so?

Reply With Quote
  #6  
Old April 18th, 2004, 06:52 AM
nazly nazly is offline
Codewalkers Beginner (1000 - 1499 posts)
 
Join Date: Apr 2007
Location: Colombo,SriLanka
Posts: 1,325 nazly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 18 sec
Reputation Power: 3
Send a message via Yahoo to nazly
RE: Connection with mysql problem

Try granting all previleges to the user

http://dev.mysql.com/doc/mysql/en/GRANT.html

Reply With Quote
  #7  
Old April 23rd, 2004, 02:52 AM
phpman phpman is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 33 phpman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to phpman
RE: Connection with mysql problem

I read the page, but didn't understand.

How would I grant privilages through prompt?

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > Connection with mysql problem


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