InMotion Hosting Support Center

connect to MSYQL with Perl

Category: Databases

2013-04-19 3:10 pm EST

Hits: 364
I have a perl script in my cgi-bin for connecting to my mysql database. The connect script isn't working. Using the Perl Module, DBI:MYSQL I'm unable to get the following work:

$dbh = DBI->connect( "dbi:mysql:bigcom5_redearthpublishing:localhost:3306", "<username>", "<password>")

The resultant error is: Access denied for user 'bigcom5_redearth'@'localhost' (using password: YES)

I've also tested the dbi:mysql statement with and without the port number -- same results. I've set up a user for this database in my cpanel, but for security, I've removed both the username and psswd from this post.


You must login before you can ask a follow up question.

You must login before you can submit an answer.



9,968 Points
2013-04-19 3:46 pm EST
Hello bigcomposer, and thanks for the question.

I'm not sure exactly what happened, but I was getting an error denied when trying to access the MySQL database directly as well with your database user.

I simply removed, and <a href="" target="_blank">re-created and attached the database user</a>, using the same password you had defined in your Perl script, and it started working now.

Please let us know if you're still having any issues at all.

- Jacob

You must login before you can post a comment about this answer.

Like this Question?

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!