Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: DBD::Mysql not working properly in mac OS X

by romy_mathew (Beadle)
on Nov 04, 2013 at 15:57 UTC ( #1061142=note: print w/ replies, xml ) Need Help??


in reply to Re: DBD::Mysql not working properly in mac OS X
in thread DBD::Mysql not working properly in mac OS X

Below is the method I used for installing DBD::Mysql

1. perl Makefile.PL –mysql_config=/usr/local/mysql/bin/mysql_config –t +estuser=root –testpassword=111111 I will use the following settings for compiling and testing: cflags (mysql_config ) = -I/usr/local/mysql/include -Os -g -fno-common + -fno-strict-aliasing -arch x86_64 embedded (mysql_config ) = ldflags (mysql_config ) = libs (mysql_config ) = -L/usr/local/mysql/lib -lmysqlclient -lpthread mysql_config (Users choice ) = /usr/local/mysql/bin/mysql_config nocatchstderr (default ) = 0 nofoundrows (default ) = 0 ssl (guessed ) = 0 testdb (default ) = test testhost (default ) = testpassword (User’s choice) = 111111 testsocket (default ) = testuser (User’s choice) = root 2. make 3. make test All tests successful. Files=51, Tests=1270, 22 wallclock secs ( 0.38 usr 0.16 sys + 3.51 c +usr 0.49 csys = 4.54 CPU) Result: PASS 4. sudo make install Installing /Library/Perl/5.12/darwin-thread-multi-2level/auto/DBD/mysq +l/mysql.bundle Appending installation info to /Library/Perl/Updates/5.12.4/darwin-thr +ead-multi-2level/perllocal.pod


Comment on Re^2: DBD::Mysql not working properly in mac OS X
Download Code
Re^3: DBD::Mysql not working properly in mac OS X
by talexb (Canon) on Nov 04, 2013 at 16:13 UTC

    OK -- can you run something very simple, either from the debugger, or as a simple script, that just connects to the database?

    Alex / talexb / Toronto

    Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

      it gives output in the terminal but the same when i try in the http://localhost/cgi-bin/hello.pl it fails from line my $dbh = DBI->connect($dsn, $userid, $password ) or die $DBI::errstr;
          it gives output in the terminal ..

        So you get the same error as when you run the CGI? Then it seems that your Perl isn't able to find the module that you say you installed. Perhaps it was installed in the wrong place, or your library path is wrong.

        It sounds like you need to address the root cause -- is the MySQL client side software loaded? Can you access MySQL from the command line?

        Alex / talexb / Toronto

        Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1061142]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2014-12-26 09:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls