Jump to content

Access denied for user 'ODBC'@'localhost'


paololzki

Recommended Posts

hi, i need help. im experiencing this error in my site.

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO)

Access denied for user 'ODBC'@'localhost' (using password: NO)

 

here's my code

 

class config_ondairon{

		var $dbHost;
		var $dbUsername;
		var $dbPassword;
		var $dbName;

		var $rateGroup;

		function config_dms() {

			$this->dbHost						= "localhost";
			$this->dbUsername					= "root";
			$this->dbPassword					= "******";
			$this->dbName 						= "dbname";



		}
} // end class
$ondaironmainconf = new config_ondairon();

class ondairon_function {
	function connect(){
		global $ondaironmainconf;
		session_start();
		$this->link = mysql_connect($ondaironmainconf->dbHost, $ondaironmainconf->dbUsername, $ondaironmainconf->dbPassword) or die(mysql_error());
		mysql_select_db($ondaironmainconf->dbName) or die(mysql_error());
	}

	function disconnect(){
		mysql_close($this->link);
	}

} // end class

$ondaironmainfunc = new ondairon_function();

Link to comment
https://forums.phpfreaks.com/topic/90616-access-denied-for-user-odbclocalhost/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.