On Aug 3, 2006, at 10:41 AM, Jay Savage wrote:

On 8/3/06, Walter Copenhaver <[EMAIL PROTECTED]> wrote:
Hello,

Has someone manage to install DBD::mysql in Mac X Tiger. Can anyone point
me to a tutorial or
how to do this.

Thanks



Walter,

Can you tell us specifically what problems you're having and what
errors you're seeing? Installations usually go pretty smoothly. Just:

   perl -MCPAN -e 'install DBD::mysql'

The only caveat I can think of is that the tests assume you're
installing DBD::mysql against a fresh MySQL installation with the root
password still unset.

They assume no such thing. They don't even assume that the server against which you're going to run the tests is on the same machine. Detailed instructions are provided with the module that detail how to provide the user name, password, host name, and other information with which to run the tests.

If you've already configured MySQL and set the
root password, the tests will all fail.

No, the tests will fail if you haven't provided the necessary information for them to connect. The root password *IS NOT* necessary. You don't have to run the tests as root either - current CPAN.pm versions allow you to run the first few steps of module building and testing as an ordinary user, and run the final step as "sudo make install".

The only requirement for the tests is that the test database (which need not be named 'test') exists, and that the test user is fully authorized to perform any operation on that database. It will need to create and drop tables, perform queries, insert and delete rows, etc.

Since it's a pretty stable
module, it's usually safe to just go ahead and force install

Agreed - provided that the tests failed with "failed to log in" errors and not some other error.

, but you
may want to unset to root password during the installation to run the
tests.

Worst. Advice. Ever.

You absolutely DO NOT want to open up a huge gaping security hole in your database.

You'll also have to force install if the the server you're
planning to use is on a different machine.

Nonsense. If the server you want to run the tests against is on another machine, simply provide a hostname (and port number if needed) in addition to the username, password, and other connection information.

In the CPAN shell, run the "look DBD::mysql" command. This will download the latest tarball and unpack it, then open up a subshell so that you can run the other commands manually.

In the subshell, run "open INSTALL.html" to open the installation docs in your default web browser. Under the "Source Installation" section, there's a "Configuration" section, where a number of options are listed that you can pass to "Makefile.PL". Determine what options you want to use, then run the commands.

For example, if I wanted to connect to the 'testme' database on 'mydbserver.invalid', and log in as 'nobody_special' with password 'lemmein', I'd run this sequence of commands:

perl Makefile.PL --testdb=testme --testhost=mydbserver.invalid -- testuser=nobody_special --testpassword=lemmein
        make
        make test
        sudo make install

Depending on how you've configured your CPAN shell - i.e. whether you're already running as root or not - you may not need to use "sudo" with the last step.

When you're done, use 'exit' or ctrl-d to leave the subshell and get back up to the CPAN shell.

sherm--

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


Reply via email to