Jump to content

Unknown PHP error (2) mysql_connect() [function.mysql-connect]


Recommended Posts

If anyone could help me with this i'd be mighty grateful:

 

PHP version: 5.2.10

MySQL version: 5.0.81-community

 

Unknown PHP error (2)
mysql_connect() [function.mysql-connect]: Access denied for user 'myusername'@'localhost' (using password: YES)
File: .../install.php
Line: 584

 

if (empty($zcontext['e']))
		{
			// test db info...
			$connection = @mysql_connect($processed['db_server'], $processed['db_user'], $processed['db_passwd']);
			if (!$connection || !@mysql_select_db($processed['db_name'], $connection))
			{
				$zcontext['e'][] = $ztxt['install'][28];

				// so the input fields are highlighted in red
				$zcontext['e'][$ekeys['db_server']] = '';
				$zcontext['e'][$ekeys['db_user']] = '';
				$zcontext['e'][$ekeys['db_passwd']] = '';
				$zcontext['e'][$ekeys['db_name']] = '';
			}

put it in your script just above

 

$connection = @mysql_connect($processed['db_server'], $processed['db_user'], $processed['db_passwd']);

 

and run it. You should see info about your $processed array output on the screen.

:psychic:  I have no idea what script you are using.  You can tell me if you like, but I'm not going to go searching for it and then look over its code.. more than likely it simply doesn't accept non-alphanumeric chars in things like username, pw, etc...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.