0

I'm attempting to install DBD::mysql, and it's failing because it cannot log into the SQL server. I have put a my.cnf in /root for the duration of the installation. I can't log in specifying mysql without '-p'. However, I can do this with a non-root account that has a my.cnf in place. I'm assuming the my.cnf would let the CPAN tests log in, which is the cause of the installation failure.

I don't want to force install this module, and I am not quite sure how to get this to install properly.

1 Answer 1

3

See DBD::mysql::INSTALL:

Environment Variables

For ease of use, you can set environment variables for DBD::mysql installation. You can set any or all of the options, and export them by putting them in your .bashrc or the like:

The relevant ones are:

export DBD_MYSQL_TESTDB=test
export DBD_MYSQL_TESTHOST=localhost
export DBD_MYSQL_TESTPASSWORD=s3kr1+
export DBD_MYSQL_TESTPORT=3306
export DBD_MYSQL_TESTUSER=me

Of course, customize the values for your situation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.