
Spectre
New User
Jan 5, 2011, 12:49 AM
Post #1 of 1
(189 views)
|
When I run my script I get the following error message: DBI connect('user_db:localhost','user_user',...) failed: Access denied for user 'user_user'@'localhost' (using password: YES) at connperl.pl line 14 I know for a fact the password is correct, and the username is correct. What permissions are needed to connect to a MySQL Database. I am running cPanel if this helps, perl version: 5.8.8, connecting using a perl script (of course I am, hehe), syntax is as follows, I have masked my real information for security purposes:
#!/usr/bin/perl # PERL MODULES use DBD::mysql; use warnings; # MYSQL CONFIG VARIABLES $host = "localhost"; $database = "user_db"; $user = "user_user"; $password = "somepasswordotherthanwhatyourereading"; # PERL CONNECT() $db=DBI->connect("dbi:mysql:$database:$host", $user, $password); I really wish I knew why this isn't working, also, I set my pl script to 775 per the request of a fellow programmer/friend's advise versus my original 644 permissions, though I am sure that will not affect this.
|