GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 07-May-2005, 16:27
Kilgayne's Avatar
Kilgayne Kilgayne is offline
Junior Member
 
Join Date: Jun 2004
Location: somewhere
Posts: 52
Kilgayne is on a distinguished road
Unhappy

Error connecting to MySQL


I'm trying to connect to mySQL but all it does is showing this message :

Warning: mysql_connect(): Accès refusé pour l'utilisateur: 'kilgayne'@'@localhost' (mot de passe: NON) in c:\program files\easyphp1-8\www\mysql.php on line 9

Warning: mysql_query(): Accès refusé pour l'utilisateur: 'ODBC'@'@localhost' (mot de passe: NON) in c:\program files\easyphp1-8\www\mysql.php on line 10

Warning: mysql_query(): A link to the server could not be established in c:\program files\easyphp1-8\www\mysql.php on line 10
ERROR CONNECTING TO MYSQL!

here's the code i use

mysql_connect("localhost","kilgayne","");
$result=mysql_query("show status");
if ($result==0) echo "ERROR CONNECTING TO MYSQL!";
else echo "CONNECTED!";

now can anybody tell me wtf i'm doing wrong?
  #2  
Old 08-May-2005, 16:03
Old_Spen Old_Spen is offline
New Member
 
Join Date: May 2005
Posts: 8
Old_Spen is on a distinguished road
Quote:
Originally Posted by Kilgayne
I'm trying to connect to mySQL but all it does is showing this message :

Warning: mysql_connect(): Accès refusé pour l'utilisateur: 'kilgayne'@'@localhost' (mot de passe: NON) in c:\program files\easyphp1-8\www\mysql.php on line 9

Warning: mysql_query(): Accès refusé pour l'utilisateur: 'ODBC'@'@localhost' (mot de passe: NON) in c:\program files\easyphp1-8\www\mysql.php on line 10

Warning: mysql_query(): A link to the server could not be established in c:\program files\easyphp1-8\www\mysql.php on line 10
ERROR CONNECTING TO MYSQL!

here's the code i use

mysql_connect("localhost","kilgayne","");
$result=mysql_query("show status");
if ($result==0) echo "ERROR CONNECTING TO MYSQL!";
else echo "CONNECTED!";

now can anybody tell me wtf i'm doing wrong?


From what I see I think you haven't created a user "kilgayne" in the mysql db
try it with "root".

On the other hand, you may have a problem with your configuration files and you will also have to make sure that your php modules are well set.

since you are using easyphp, this should be as easy as 'abc'.

Tip:

While creating users, specify which authority they have, read, write , update, delete, etc.


Hope this helped.


Cheers,

Old_Spen.
  #3  
Old 08-May-2005, 18:05
Kilgayne's Avatar
Kilgayne Kilgayne is offline
Junior Member
 
Join Date: Jun 2004
Location: somewhere
Posts: 52
Kilgayne is on a distinguished road
yay \o/ it works with "root"! danke schön spen!

i thought the users on mysql were, like, the same that those on the OS (there's only the user Kilgayne on my comp so meh) (and yes, i'm a total newb)
  #4  
Old 27-May-2005, 08:15
developerszone developerszone is offline
New Member
 
Join Date: May 2005
Posts: 2
developerszone is on a distinguished road

Hello


Hello u got a mistake in your connection. thats why u having that error code
Where we have
this
$conn= mysql_connect("localhost","blah_kilgayne","passwor d"); or die cannot connect to db mysql error());
$db = mysql_select_db ("blah_db");
$query = ( blah blah
$result=mysql_query("show status");
if ($result==0) echo "ERROR CONNECTING TO MYSQL!";
else echo "CONNECTED!";

and not

mysql_connect("localhost","kilgayne","");
$result=mysql_query("show status");
if ($result==0) echo "ERROR CONNECTING TO MYSQL!";
else echo "CONNECTED!";


Thats just an example
  #5  
Old 27-May-2005, 14:45
Kilgayne's Avatar
Kilgayne Kilgayne is offline
Junior Member
 
Join Date: Jun 2004
Location: somewhere
Posts: 52
Kilgayne is on a distinguished road
err thx I guess... but this problem was solved weeks ago :-? so yeah

i'm not having any more problems with mysql. as a matter of fact last week i could finish building the basics of my site. thanks to spen for helping me out :-P
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting Mysql server problem pjacks MySQL / PHP Forum 23 08-Sep-2004 18:23
PHP, MySQL, WML skyloon MySQL / PHP Forum 0 05-Mar-2004 08:53
A problem Between MySQL <> phpBB mirable MySQL / PHP Forum 3 10-Sep-2003 06:31
Windows: From only £20p/y,Linux: from $10p/m. ASP, ASP.NET, PHP, Free MySQL, +More EyotaHosts Web Hosting Advertisements & Offers 0 28-Jun-2003 14:54

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:12.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.