By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

Mysql database problem

P: 6
This is the problem i am getting. It is simple but i am new to the PHP.

"Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: YES) in D:\wamp\www\dddd.php on line 2
Could not connect: Access denied for user 'ODBC'@'localhost' (using password: YES)"
Feb 13 '08 #1
Share this Question
Share on Google+
4 Replies


harshmaul
Expert 100+
P: 490
can you log in to the Mysql directly without using PHP?

please post you connection code.... your password user combination probably isn't valid
Feb 13 '08 #2

werks
100+
P: 220
Post your code so we can analyze it..

--
Kenneth
"Better Than Yesterday"
Feb 13 '08 #3

P: 6
can you log in to the Mysql directly without using PHP?

please post you connection code.... your password user combination probably isn't valid
This code was retrived from google search. If any mistacks in this plz tell. I am beginner of PHP. I have little bit knowledge in that. plz tell.

password: sreeni

<?php
$con = mysql_connect("","","sreeni");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
// some code
mysql_close($con);
?>
Feb 14 '08 #4

harshmaul
Expert 100+
P: 490
Your code seems to be fine.

Try two things for me please....

Log in using the credentials to the MySql command line interface, if you have access to that.

And if not...
just to make sure the user names and passwords fill in the blanks for the following code, and try a simple select statement (select * from tbl***)

Expand|Select|Wrap|Line Numbers
  1. $username="";    //the user name (maybe root)
  2. $password="";    //the password
  3. $database="";   //the database you will be using
  4. $host="";   //theMySql server you are trying to connect to
  5. mysql_connect($host,$username,$password);
  6. @mysql_select_db($database) or die( "Unable to select database");
Feb 14 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.