I need help

A

Anonymous

Guest
Where did i get wrong..what does this error means?? what should be done?




Warning: mysql_connect(): Access denied for user 'ODBC'@'localhost' (using password: NO) in c:\webs\test\birthdays_create_database.php on line 4
Couldn't connect to MySQL
 
you are trying to localy connect to mysql server without a username and a password.

use:
Code:
<?php
$host = "localhost";
$username = "Username_here"; // change to your username
$password = "password"; // change to your password

$link = mysql_connect($host, $username, $password) or die(mysql_error());
?>
 
thanks guy for ur time..i have figured it ou..instead of using mysql_connect...i used mysqli_connect... :)


But what should be done if i upload may html files to a free web space provider..how will it work with apache and php...instead of having http://localhost.... i want to have http://url/...please help me..
 
hosting provider will give you information regarding your username password and host address.
using mysql_connect or mysqli_connect will not solve the problem if you are trying to connect to a server without those parameters... it only works on local machines... so i think you should check that you are using the correct and full syntax for connect command... jsut in case :)
 
Back
Top