Click to See Complete Forum and Search --> : [RESOLVED] mysql_connect problem


1andyw
04-04-2007, 07:02 PM
I created a new user
GRANT SELECT, INSERT, UPDATE ON db1.consumer TO 'adam'@'localhost' IDENTIFIED BY 'mysite'";
How do I alter my connect statement to reflect this?
This is my old statement:

<?php
$domain="localhost";
$user="admin123";
$password="123report";
$conn = mysql_connect( $domain, $user, $password );
?>

Thanks for your help.

Andy

raaam
04-04-2007, 11:51 PM
hi...


<?php
$domain="localhost";
$user="adam";
$password="mysite";
$conn = mysql_connect( $domain, $user, $password );
?>

1andyw
04-05-2007, 07:47 AM
Tried that. It returns 'access denied for user 'adam@localhost' USING PASSWORD 'YES'.

I am only connecting successfully when the user has full privileges on the entire database. I am attempting to match the level of need to the level of access.

Thanks,

Andy

bokeh
04-06-2007, 11:28 AM
is it mysql 4.1.x?

1andyw
04-06-2007, 11:56 AM
bokeh,

version 4.0.15-nt

Andy

bokeh
04-06-2007, 04:50 PM
This is a known problem. Do a search in google for "mysql old passwords"

1andyw
04-06-2007, 06:52 PM
Thank you.

Andy

1andyw
04-07-2007, 08:36 PM
I am making progress!
I have updated mySql to version 4.1.22.
I am now running Apache 1.3.28, php 4.3.9, and they are playing nice with mySql 4.1.22. My scripts seem to work as designed, so far.

However, phpmyadmin 2.10.0.2 won't cooperate. It returns an error:

"1045 - Access denied for user: 'myusername@localhost' (using password: Yes)

I have amended the config file to include the correct password.

Do compatibility issues exist with phpmyadmin and mySql 4.1.22?

Thanks,

Andy

bokeh
04-08-2007, 03:50 AM
The software you are using is 3 years old; if you want useful advice update to modern versions that everyone else is using (Apache 2.2.4, PHP 5.2.1, phpMyAdmin 2.10.0.2, MySQL 5.0.3).

1andyw
04-08-2007, 07:48 AM
I am attempting to keep on my development pc, programs similar to the ISPs upon which the scripts will be hosted.

I am at this time, working on two separate ISPs running

Apache 1.3.3
php 4.4.4
mySql 4.1.21

I worry that if I upgrade my development environment, I will cause more problems when I deploy the scripts.

I would love the direct my clients to hosts that use the programs you list but that ain't going to happen.

I appreciate your help, Bokeh.

Sincerely,

Andy

bokeh
04-08-2007, 08:27 AM
Have you reset MySQL to old-passwords?

http://dev.mysql.com/doc/refman/4.1/en/old-client.html

1andyw
04-08-2007, 09:19 AM
Yes I have.
Currently, a query "SELECT * FROM users" (db mysql) returns "localhost | root | 3dec706745829e74". That is OLD_PASSWORD(andrew).

The config.ini.php for phpmyadmin shows:

$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['password'] = 'andrew';

When I attempt to load phpmyadmin, the error message is:

" MySQL said: Documentation
#1045 - Access denied for user 'andy'@'localhost' (using password: YES) "

I am not sure where phpmyadmin is finding this old information for user 'andy'@'localhost'.

I have shut down and rebooted but the error stays the same.

Andy

1andyw
04-08-2007, 02:48 PM
Problem is resolved.

I deleted old files, cleared the cache, rebooted and I am back in business.

Thank you for your help.

Andy