Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

But the login and password are correct!?!?!

Status
Not open for further replies.

AlbertAguirre

Programmer
Nov 21, 2001
273
0
0
US
hey all.. using mysql and perl at the command line.

I am using a legit login and password for the db but I get this:

DBI connect('dbPortal:[ip here]','[login]',...) failed: Access denied for user '[login]'@'[ip here]' (using password: YES) at /usr/local/lib/perl5/site_perl/5.8.5/DBD/mysqlPP.pm line 109 at tmp2.pl line 6


heres my code:

#!/usr/bin/perl -w

use DBI;

$dbh = DBI->connect("DBI:mysqlPP:dbPortal:[ip here]","[login]","[password]");

$dbh->disconnect;



please help?

I understand theres supposed to be an entry in the hosts table as well as user tables? I know the user is in there and theres an entry for host "@" which means all?
 
Have you tried connecting with those credentials OUTSIDE of Perl? When in doubt, your first step in troubleshooting is to query MySQL directly.

If you can connect directly, try posting your question in the Perl forum.

Best of luck!
 
i did and it did work.

I found the problem!

after assigning the user permissions I needed to do a "flush privileges"

That worked.

Thank you anyway!
 
if you change the tables in mysql database then you need flush privileges. if you change the information using GRANT syntax you don't need to.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top