Page 1 of 1

Cannot gain access to phpmyadmin. Help please.

Posted: Sun Apr 18, 2010 2:39 pm
by footyboy87
The code is below the effor. It is also linked to another PHP file in Dreamweaver which allows users to subscribe/unsub from an email service.
I keep getting;

"Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'aidan1'@'localhost' (using password: YES) in C:\Users\aidan\Desktop\3RD YEAR!!\Steve Pressland\server2go_a2\htdocs\Home_Fundraising\random.php on line 7
Connect failed: Access denied for user 'aidan1'@'localhost' (using password: YES) "

Code: Select all

<?php

	function doDB() {
		global $mysqli;
		
		//connect to server and select database; you may need it
		$mysqli = mysqli_connect("localhost","aidan1","password","hhh");
		
		
		//if connection fails, stop script execution
		if (mysqli_connect_errno()) 
		{
			printf("Connect failed: %s\n", mysqli_connect_error());
			exit();
		}
	}

function emailChecker($email) {
	global $mysqli, $check_res;
	
	//check that the email is not already in list
	$check_sql - "SELECT id FROM SUBSCRIBERS 
	WHERE email = '".$email."'";
	$check_res = mysqli_query($mysqli, $check_sql)
		or die(mysqli_error($mysqli));
		}
?>
Thanks in advance!

Re: Cannot gain access to phpmyadmin. Help please.

Posted: Mon Apr 19, 2010 12:49 am
by Christopher
Either the username and/or password is wrong, or you have not granted access to that user for that database.

Re: Cannot gain access to phpmyadmin. Help please.

Posted: Tue Apr 20, 2010 3:43 am
by footyboy87
That isn't the case as all everything is granted to that user and the password/username are fine. any ideas guys??