Jump to content

Error Connecting To Mysql Server


villermen
 Share

Recommended Posts

I've just installed MySQL on my computer, and got it all running now.The problem is when I try to connect to MySQL via PHP, it gives an error message.The error message given is:

Could not connect: Access denied for user 'ODBC'@'localhost' (using password: NO)PHP Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in [[path to file (hid it)]] on line 2

The .php file run only contains the following part from the MySQL connect tutorial:

<?php$con = mysql_connect();if (!$con)  {  die('Could not connect: ' . mysql_error());  }?>

Why and how is the acces denied?I can't find out where the problem lies, can anybody help me fixing it?Website:IIS (run from localhost)PHP 5.2.10 (run from localhost/linked to IIS/working fine/mysql extension supported)MySQL 5.1 (configured with no password and username)Gr.Villermen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...