connect to MSYQL with Perl

Category: Databases

bigcomposer
Asked:
2013-04-19 3:10 pm EST

Hits: 313
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.

Thanks!

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

You must login before you can submit an answer.

OTHER ANSWERS

1

JacobIMH
Staff
9,962 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 re-created and attached the database user, 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?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

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: support@InMotionHosting.com
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!