MySQL Perl DBI

Dear Wise & Powerful Masters of OS X,
I had written a large number of perl scripts that passed information back & forth to MySQL. Then my disk drive wore out & broke down`;'^(
What is the best way to restore the DBI(Data Base Interface)between MySQL & perl? So far I get:
$perl new.pl
install_driver(mysql) failed: Can't find 'bootDBD_mysql' symbol in /opt/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/DBD/mysql/mysql.bundle
at (eval 4) line 3
Compilation failed in require at (eval 4) line 3.
at new.pl line 143
$
Thank you for your kind wisdom.
Your humble unix geek,
Kurt

Ok - I am getting closer to resolving this issue. I downloaded MySQL server libraries from Apple, file and instructions are here: http://support.apple.com/kb/HT4006
After that, I was able to install Perl DBD::MySQL ver 4.013
Now machine sees it but a different error is thrown:
"install_driver(mysql) failed: DBD::MySQL object version 4.013 does not match bootstrap parameter 4.005 at /System/Library/Perl/5.10.0/darwin-thread-multi-2level/DynaLoader.pm line 230.
Compilation failed in require at (eval 3) line 3."
Now, there is a 4.005 version of DBD::MySQL but it is 3 years old. I am not sure if it is just a coincidence with a "4.005" index being similar to module version number, or this is indeed what system is requiring.
Any suggestions? Thanks in advance

Similar Messages

  • Can't install Perl DBI or DBD::mysql after Mountain Lion upgrade

    I recently upgraded to Mountain Lion and found that my Perl DBI scripts stopped working, with the error message "Can't locate DBD/mysql.pm in @INC".
    The last time this happened, after upgrading to Lion, the solution was to install the new version of Xcode. Then I was able to use the Perl CPAN module to install DBI and DBD::mysql. (MySQL is already installed and running with no problem on the Mountain Lion machine.)
    Now I have installed Xcode 4.5.1, and tried
    mrb% sudo perl -MCPAN -e shell
    [then CPAN configures itself]
    cpan[1]> install DBI
    and it fails with this final message:
    /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/perl.h:583:11: fatal error:
          'sys/types.h' file not found
    #       include <sys/types.h>
                    ^
    1 error generated.
    make: *** [Perl.o] Error 1
      TIMB/DBI-1.622.tar.gz
      /Developer/usr/bin/make -- NOT OK
    'YAML' not installed, will not store persistent state
    Running make test
      Can't test without successful make
    Running make install
      Make had returned bad status, install seems impossible
    Failed during this command:
    TIMB/DBI-1.622.tar.gz                        : make NO
    Can anybody help?

    Here is a link to a resolution in Lion. It may also solve your Mountain Lion Perl DBD issue as well.
    If you run the command below before executing your Perl script the library is found and all is well!
    export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
    Put this in your .bashrc or .bash_profile.
    On Apple StackExchange, Matthew Weiss had another approach.
    I found on another website the following command
    $ sudo perl -MCPAN -e 'CPAN::Shell->notest(install => CPAN::Shell->r)'
    This updated all my perl modules and all is back to normal. Not sure why or what, but don't care that it is working now.

  • SAMP perl dbi mysql

    I have Solaris 10 0606 running with Apache2 mysql and php - all standard. I can access data on mysql thru a simple php script via Apache2. I would like to run a Perl cgi script to access the mysql database, but am having problems. It appears DBI.pm is not available. Does Solaris 10's 0606 full install support the ability to access mysql data via Perl DBI or other mechanism? If so, does anyone have a simple example of how this was done? If it is not supported, and additional Perl modules or other configurations are needed, does any one have a listing of steps to get this working? Thanks!

    This is a bug report I filed with Blastwave.org after attempt to use their DBI::Mysql package.
    perl: fatal: relocation error
    Description      I cant get Solaris 5.10 0606 packaged version of perl and Mysql to connect using Blastwave added module pm_dbi and pm_dbdmysql. Fails with -- ld.so.1: perl: fatal: relocation error: file /opt/csw/lib/perl/csw/auto/DBI/DBI.so: symbol Perl_Gthr_key_ptr: referenced symbol not found
    Additional Information      SunOS sol10 5.10 Generic_118855-15 i86pc i386 i86pc
    This is perl, v5.8.4 built for i86pc-solaris-64int
    (with 28 registered patches, see perl -V for more detail)
    mysql Ver 12.22 Distrib 4.0.24, for pc-solaris2.10 (i386)
    smupdate 07-25-2006
    $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";
    Supporting information:
    http://woss.name/2006/05/21/installing-dbimysql-on-solaris-10/
    http://forum.sun.com/jive/thread.jspa?threadID=96067&messageID=331249
    And the bug report response:
    http://www.blastwave.org/mantis/view_bug_page.php?f_id=0001674
    This is not a bug in CSWpmdbi. All blastwave perl modules are built to use CSWperl. CSWpmdbi is also built to work with CSWmysql4.
    I recommend that you use the blastwave packages and not the Sun supplied packages. Many sites use the blastwave packages and they can use any other blastwave package that needs perl and mysql. The same is true for perl and postgresql.
    Or, if you believe that you must use the Sun supplied perl and mysql, you should be able to build and install DBI. You will need to download Studio 11. Studio 11 is available at no cost to you.

  • Oracle 8i equivalent of $sth- {mysql_insertid} w/Perl DBI?

    What is the easiest way to obtain the value of an auto-incrementing column following an insert using Perl DBI with Oracle 8i? I've done it for years under MySQL using my($lastInsertID)=$sth->{mysql_insertid}, but that's obviously MySQL-specific (if only because of the name).

    : 2 - can't use PERL in o/s because O/S is Linux
    and clients cgi's
    : use DBI:DBD:Oracle. There doesn't seem to be a
    DBD for DBI for
    : Oracle 8i for Linux. I have succeeded in
    making our scripts talk
    : to an Oracle 8.0.5 database, but get many
    errors when connecting
    : to 8.1.5 Does anybody out there have DBD for
    DBI for 8.1.5 for
    : linux RH 5.2 ????
    DBD::Oracle should work just fine with 8.1.5.
    What's so special about 8.1 vs 8.0? I beleive
    OCI was not changed. Anyway, it works here. What
    version did you try? Latest is 1.03, AFAIK. If
    you have errors you probably should report them
    back to the author: Tim Bunce
    <[email protected]>
    Cheers,
    Ivan
    null

  • Perl DBI module question

    when I use perl DBI module to connect oacle, there is an error of
    "DBI->connect failed: ORA-12224: TNS:no listener (DBD ERROR:
    OCIServerAttach)", how can I do?
    null

    Ok - I am getting closer to resolving this issue. I downloaded MySQL server libraries from Apple, file and instructions are here: http://support.apple.com/kb/HT4006
    After that, I was able to install Perl DBD::MySQL ver 4.013
    Now machine sees it but a different error is thrown:
    "install_driver(mysql) failed: DBD::MySQL object version 4.013 does not match bootstrap parameter 4.005 at /System/Library/Perl/5.10.0/darwin-thread-multi-2level/DynaLoader.pm line 230.
    Compilation failed in require at (eval 3) line 3."
    Now, there is a 4.005 version of DBD::MySQL but it is 3 years old. I am not sure if it is just a coincidence with a "4.005" index being similar to module version number, or this is indeed what system is requiring.
    Any suggestions? Thanks in advance

  • How to install Perl DBI & DBD modules correctly?

    PLEASE HELP!
    I'm running OS X Snow Leopard 10.6.3 on a MacBook Pro.
    Using MacPorts I've installed the following items:
    mysql5 @5.1.45_0 (active)
    mysql5-server @5.1.45_0 (active)
    p5-dbd-mysql @4.013_0+mysql5 (active)
    p5-dbi @1.609_0 (active)
    perl5.10 @5.10.1_1+darwin (active)
    Everything seems to be working, with the exception ofthe Perl DBI module, and the DBD module. Whenever I try to run a Perl program using DBI, I get the following error:
    Sun Apr 18 03:18:42 EDT 2010
    ~/Perl1 ->
    [email protected]<520>$: db.pl
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 .) at (eval 3) line 3.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, SQLite, Sponge.
    at /Users/peterv/Perl1/db.pl line 8
    Sun Apr 18 03:18:42 EDT 2010
    If anyone can also explain what @INC is (I'm assuming it's some kind of path), how to display its value, and how to set it correctly, I'd appreciate that too! I've been working on this for days, so I'd really be grateful for some help!
    Thanks,
    Peter V.

    I've found the problem. I didn't realize that OS X Snow Leopard came with 2 versions of Perl installed, so when I wanted to upgrade to 5.10, I installed it using MacPorts. I also hadn't realized that MacPorts paths had /opt/local prepended to them, so I was running the wrong version of Perl with it. Now I don't get the original error message I posted, but I do get these error messages:
    dyld: lazy symbol binding failed: Symbol not found: mysqlinit
    Referenced from: /opt/local/lib/perl5/site_perl/5.10.1/darwin-multi-2level/auto/DBD/mysql/mysql. bundle
    Expected in: dynamic lookup
    dyld: Symbol not found: mysqlinit
    Referenced from: /opt/local/lib/perl5/site_perl/5.10.1/darwin-multi-2level/auto/DBD/mysql/mysql. bundle
    Expected in: dynamic lookup
    Trace/BPT trap
    Can someone help me out with these?
    Thanks in advance!

  • [SOLVED] Error with mysql/perl

    I am horribly ignorant of mysql/perl, I just know they have been working as I have a myth server and all works well, but currently I'm attempting to set up Torrentflux and mythrename.pl, both which give an error that in my eyes appears similar, hopefully someone can sort this out??
    Here is the command that is one step of setting up torrentflux:
    ~ # mysql_setpermission -u root
    Password for user root to connect to MySQL:
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0 /usr/share/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /usr/lib/perl5/current /usr/lib/perl5/site_perl/current .) at (eval 9) line 3, <STDIN> line 1.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
    at /usr/bin/mysql_setpermission line 71
    ~ #
    And here's trying to run mythrename.pl:
    ~ # /usr/share/mythtv/contrib/mythrename.pl --link /media/mythtv/ --format %T/%T%-%S
    Net::UPnP::ControlPoint is not installed!
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0 /usr/share/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /usr/lib/perl5/current /usr/lib/perl5/site_perl/current .) at (eval 13) line 3.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
    at /usr/share/perl5/site_perl/5.10.0/MythTV.pm line 337
    ~ #
    EDIT: Okay, I just got help from someone in IRC and it was perl-related. I set up cpan as per the wiki here: http://www.mythtv.org/wiki/index.php/Mythrename.pl. It works great now!
    Last edited by colbert (2008-08-01 21:28:54)

    I am horribly ignorant of mysql/perl, I just know they have been working as I have a myth server and all works well, but currently I'm attempting to set up Torrentflux and mythrename.pl, both which give an error that in my eyes appears similar, hopefully someone can sort this out??
    Here is the command that is one step of setting up torrentflux:
    ~ # mysql_setpermission -u root
    Password for user root to connect to MySQL:
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0 /usr/share/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /usr/lib/perl5/current /usr/lib/perl5/site_perl/current .) at (eval 9) line 3, <STDIN> line 1.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
    at /usr/bin/mysql_setpermission line 71
    ~ #
    And here's trying to run mythrename.pl:
    ~ # /usr/share/mythtv/contrib/mythrename.pl --link /media/mythtv/ --format %T/%T%-%S
    Net::UPnP::ControlPoint is not installed!
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0 /usr/share/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /usr/lib/perl5/current /usr/lib/perl5/site_perl/current .) at (eval 13) line 3.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
    at /usr/share/perl5/site_perl/5.10.0/MythTV.pm line 337
    ~ #
    EDIT: Okay, I just got help from someone in IRC and it was perl-related. I set up cpan as per the wiki here: http://www.mythtv.org/wiki/index.php/Mythrename.pl. It works great now!
    Last edited by colbert (2008-08-01 21:28:54)

  • MaxDB perl DBI and sql error -4008

    I'm using PERL DBI module to connect to my liveCache instances, as a read-only user, to obtain status of various things.
    I've installed the latest MaxDB DBI modules and latest MaxDB 7.7 Linux runtimes.
    I can successfully connect to a livecache 7.4 instance, but for some reason when I connect to a 7.6 instance I get a DBI error:
    sql error -4008
    failed: POS(1) Unknown user name/password combination
    My code is:
    $dbMAXDB = DBI->connect("dbi:MaxDB:$o_nodename/$o_SID",$maxdb_usr,$maxdb_pwd, \%dbi_attr) or die;
    The above code works with 7.5 etc, but not for my 1 single 7.6 instance!
    The username/pwd is correct, as using dbmcli with the same username/pwd works.
    Has anyone experienced this, or can someone offer a solution?

    Maybe you use the administrator user instead of the SQL user? MaxDB distinguishes between “Administrators” - as we called them - and “SQL users”. The group of “Administrators” (Database Manager operators, DBM operators) is used for the administration of the database only (start, stop, backup etc.) and cannot be used to open a SQL session. So please make sure that the user is a SQL user.
    Also you might check if you will be able to connect to the database with the command line tool sqlcli using this user.
    Regards,
    Marco

  • Perl DBI and DBD

    I know there has been a thread for this but there does not to be an answer to this.
    I have a new mac mini with Snow Leopard which I installed MYSQL 5 64 bit. I am trying to run perl scripts that connect to MYSQL but Perl throws an error regarding the DBD module. I have tried using CPAN to update the modules which seems to be successfull in regards updating but still I get the DBD module error. I have tried installing the modules manually but still I get the same error. Also I tried 32 bit MySQL but still it does not work.
    Has anyone solved this problem at all? I have rolled back my Mac using timemachine to the stock build so I am ready to try this all again!
    Regards
    Chris.
    Message was edited by: BigChrisUK01

    BigChrisUK01 wrote:
    to be honest I am not totally sure what I am doing.
    Unfortunately, you are going to have to find out. You are trying to get 4 very complex systems (MacOS X, MySQL, Perl, and CPAN) all working together. Plus, you have chosen to do so on a brand-new OS.
    If you want people to be able to help you can't just say things like "an error", "does not work", or "a web site". You must be explicit. What error are you getting? Use copy and paste. If you try it a different way, what error is that? What web site were you looking at? Maybe it was from 2002.
    Your first step is to find out just what is installed on your system. Use the command "file" to find out what architecture your mysqlclient libraries are. Also find out about your DBD files.

  • Perl DBI and DBD::Oracle

    Has anyone had any exerience with using Perl, DBI and DBD::Oracle to access Oracle databases on NT? I'll be starting a project that requires this kind of configuration and I was wondering if anyone has pointers.
    TIA!

    try cpan.org

  • Using perl DBI on Solaris 10 gives core dump

    I am using perl 5.8.4 which comes along with Solaris 10.
    I have installed DBI-1.58.
    Even a test command is not working.
    perl -MDBI -e 'print "$DBI::VERSION\n";'
    Bus Error (core dumped)
    truss perl -MDBI -e 'print "$DBI::VERSION\n";'
    shows
    stat("/usr/local/lib/libc.so.1", 0xFFBFE5D0) Err#2 ENOENT
    mprotect(0xFEED0000, 104171, PROT_READ|PROT_WRITE|PROT_EXEC) = 0
    mprotect(0xFEED0000, 104171, PROT_READ|PROT_EXEC) = 0
    munmap(0xFF370000, 8192) = 0
    brk(0x000A2470) = 0
    brk(0x000A4470) = 0
    brk(0x000A4470) = 0
    brk(0x000A6470) = 0
    brk(0x000A6470) = 0
    brk(0x000A8470) = 0
    brk(0x000A8470) = 0
    brk(0x000AA470) = 0
    brk(0x000AA470) = 0
    brk(0x000AC470) = 0
    Incurred fault #5, FLTACCESS %pc = 0xFEED44CC
    siginfo: SIGBUS BUS_ADRALN addr=0x00000001
    Received signal #10, SIGBUS [default]
    siginfo: SIGBUS BUS_ADRALN addr=0x00000001
    $perl -v
    command shows like its compiled with Intsize of 64 is this creating problem?
    Summary of my perl5 (revision 5 version 8 subversion 4) configuration:
    Platform:
    osname=solaris, osvers=2.10, archname=sun4-solaris-64int
    uname='sunos localhost 5.10 sun4u sparc SUNW,Ultra-2'
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    Compiler:
    cc='cc', ccflags ='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xarch=v8 -D_TS_ERRNO',
    optimize='-xO3 -xspace -xildoff',
    cppflags=''
    ccversion='Sun WorkShop', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=87654321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
    Linker and Libraries:
    ld='cc', ldflags =''
    libpth=/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version=''
    Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE'
    cccdlflags='-KPIC', lddlflags='-G'
    Characteristics of this binary (from libperl):
    Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
    Locally applied patches:
    22667 The optree builder was looping when constructing the ops ...
    22715 Upgrade to FileCache 1.04
    22733 Missing copyright in the README.
    22746 fix a coredump caused by rv2gv not fully converting a PV ...
    22755 Fix 29149 - another UTF8 cache bug hit by substr.
    22774 [perl #28938] split could leave an array without ...
    22775 [perl #29127] scalar delete of empty slice returned garbage
    22776 [perl #28986] perl -e "open m" crashes Perl
    22777 add test for change #22776 ("open m" crashes Perl)
    22778 add test for change #22746 ([perl #29102] Crash on assign ...
    22781 [perl #29340] Bizarre copy of ARRAY make sure a pad op's ...
    22796 [perl #29346] Double warning for int(undef) and abs(undef) ...
    22818 BOM-marked and (BOMless) UTF-16 scripts not working
    22823 [perl #29581] glob() misses a lot of matches
    22827 Smoke [5.9.2] 22818 FAIL(F) MSWin32 WinXP/.Net SP1 (x86/1 cpu)
    22830 [perl #29637] Thread creation time is hypersensitive
    22831 improve hashing algorithm for ptr tables in perl_clone: ...
    22839 [perl #29790] Optimization busted: '@a = "b", sort @a' ...
    22850 [PATCH] 'perl -v' fails if local_patches contains code snippets
    22852 TEST needs to ignore SCM files
    22886 Pod::Find should ignore SCM files and dirs
    22888 Remove redundant %SIG assignments from FileCache
    23006 [perl #30509] use encoding and "eq" cause memory leak
    23074 Segfault using HTML::Entities
    23106 Numeric comparison operators mustn't compare addresses of ...
    23320 [perl #30066] Memory leak in nested shared data structures ...
    23321 [perl #31459] Bug in read()
    Built under solaris
    Compiled at Jul 26 2005 05:26:55
    @INC:
    /usr/perl5/5.8.4/lib/sun4-solaris-64int
    /usr/perl5/5.8.4/lib
    /usr/perl5/site_perl/5.8.4/sun4-solaris-64int
    /usr/perl5/site_perl/5.8.4
    /usr/perl5/site_perl
    /usr/perl5/vendor_perl/5.8.4/sun4-solaris-64int
    /usr/perl5/vendor_perl/5.8.4
    /usr/perl5/vendor_perl
    Other details:
    file /usr/bin/perl
    /usr/bin/perl: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped
    I tried installing DBI module using perlgcc also.
    perlgcc Makefile.PL
    make
    make test
    make install.
    $uname -a
    SunOS twirl 5.10 Generic_118822-25 sun4u sparc SUNW,Ultra-80
    Please help me out.

    Try this guy's list, he maintain an archive of Solaris package.
    http://www.ibiblio.org/pub/packages/solaris/sparc/html/creating.solaris.packages.html
    Of course, if you can get directly from Sun will be better.

  • Solaris 10 sparc + mysql + perl + dbd mysql + apache2

    Is there any sane way to build dbd 4.013 mysql on a clean solaris box with sunstudio installed?
    I want to use the mysql that comes with solaris 10.
    I want to use the perl installation that comes with solaris 10.
    I have been trying to build it for days on u8 sparc. Everything else works. Heck, I even got imagemagick and perlmagick to build correctly.
    CPAN does not work for DBD
    cc does not work.
    I assume this has to do with the version of mysql that comes 'preinstalled' in solaris 10.
    Any suggestions?

    Nothing at all. In fact I have never ever had a problem with sunstudio. It boggles the mind that they put those SUNWgcc packages on a Solaris release but not sunstudio. It is such a great bit of software.
    I have now found the only way to really get around this is to build mysql from scratch and then build dbd. It worked perfectly just now. I could not get DBD to build with any of the packaged version of mysql. This makes updating difficult but I can get around that.
    Now my stupid perlmagick is busted though. arrggghhh....
    Edited by: kjard_us on Nov 7, 2009 12:38 PM
    Never mind... forgot that silly
    crle -l /lib:/usr/lib:/local/lib:/usr/local/lib
    everything is good now.
    Edited by: kjard_us on Nov 7, 2009 1:03 PM

  • Errors connecting to Oracle via perl DBI

    Hi List.
    I've installed Oracle on my linux box (SuSE 10) and I've installed
    DBD::Oracle.
    I can run sqlplus as the oracle user however when I try and connect via
    DBD::Oracle in a perl script I always get errors as follows:
    connect string =
    my $dbh = DBI->connect("dbi:Oracle:ORCL", 'oracle', 'oracle' );
    error =
    DBI connect('ORCL','oracle',...) failed: ORA-12541: TNS:no listener (DBD
    ERROR: OCIServerAttach) at ora1.pl line 7
    Connection Failed...
    connect string =
    my $dbh = DBI->connect("dbi:Oracle:HOST=linux.site;SID=ORCL;PORT=1522",
    'oracle', 'oracle' );
    error =
    DBI connect('HOST=linux.site;SID=ORCL;PORT=1522','oracle',...) failed:
    ORA-12541: TNS:no listener (DBD ERROR: OCIServerAttach) at ora1.pl line 7
    Connection Failed...
    Maybe I have the connect string wrong?
    Below is a listing of my code, and my tnsnames.ora:
    Thanks in advance for your help.
    ############ code listing ################ #!/usr/bin/perl
    use DBI;
    print "Started\n";
    my $dbh = DBI->connect("dbi:Oracle:HOST=linux.site;SID=ORCL;PORT=1522",
    'oracle', 'oracle' );
    if ($dbh) {
    print "Connected...\n";
    else {
    print "Connection Failed...\n";
    exit;
    my $qry = $dbh->prepare("select count(*) from dba_tables");
    $qry->execute();
    my @data = $qry->fetchrow_array();
    print "[$data[0]] [$data[1]] [$data[2]]\n";
    exit;
    ######### tnsnames.ora listing #####################
    # Generated by Oracle configuration tools.
    LISTENER_ORCL =
    (ADDRESS = (PROTOCOL = TCP)(HOST = linux.site)(PORT = 1522))
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = linux.site)(PORT = 1522))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )

    'TNS: no listener' usually means that your listener hasn't been started. Try a lsnrctl status to find out whether your Listener is actually running.

  • Perl DBI and ODBC Access to Oracle

    I am trying to communicate with an Oracle database from a Debian Linux system.
    I have looked through much documentation of various vintages, on how to achieve this, but I am still unclear about what I need.
    I have the iODBC stuff, but this seems to need a "driver". Most references to drivers seem to need something from the Oracle distribution - typically header files or "oracle.mk"
    Can anyone point me to an open source or downloadable driver, or help me to identify a way of downloading the necessary bits of Oracle to permit a driver to be built.
    Thanks, (in hope),
    Dave Whiteley

    Re the reply below,
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by gv ():
    you need two things:
    the DBI package (interface)
    the DBD package (driver)
    you can find both on CPAN
    <HR></BLOCKQUOTE>
    Things are not as simple as indicated. To install the DBD package you MUST have an environmental variable ORACLE_HOME set up and pointing at an Oracle installation. It reads some of the files there in order to install itself.
    This means that to install DBD:Oracle you need to first install Oracle... Unless, someone knows which files are necessary for the install, and they are legally availablke without breaking the Oracle license.
    I have sucessfully installed DBD:Oracle in this way (at least, I can communicate with a remote server).
    There are similar issues with DBD:ODBC.
    This installs easily, however, as I understand the situation, it needs to communicate with other local "driver" software in order to contact the remote server. I I have not yet sucessfully installed and used this "driver" software. Again this seems to require a lcal Oracle installation.
    The driver software consists of a driver manager, and the driver itself. Different people distribute different versions of these and the documentation available has confused me - perhaps some of it is out of date?
    Up to now I am working on a lightly loaded machine with space. I will need to set up the working system on another more heavily loaded machine. I do not want to have to Install Oracle on that. I will never use it. It will only be there to permit installation of the Perl DBD stuff.
    Hints and advice welcome.
    Dave

  • MySQL doesn't start[solved]

    I can't get the MySQL server to start.
    I have followed the wiki entry and fixed all the permissions and the ownership.
    Here is the error log
    lovelock# mysqld_safe
    111209 17:28:19 mysqld_safe Logging to '/var/lib/mysql/lovelock.err'.
    111209 17:28:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    111209 17:28:19 mysqld_safe mysqld from pid file /var/lib/mysql/lovelock.pid ended
    lovelock# cat /var/lib/mysql/lovelock.err
    111209 17:28:19 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
    /usr/bin/mysqld: Table 'mysql.plugin' doesn't exist
    111209 17:28:19 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
    111209 17:28:19 InnoDB: The InnoDB memory heap is disabled
    111209 17:28:19 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    111209 17:28:19 InnoDB: Compressed tables use zlib 1.2.5
    111209 17:28:19 InnoDB: Initializing buffer pool, size = 128.0M
    111209 17:28:19 InnoDB: Completed initialization of buffer pool
    111209 17:28:19 InnoDB: highest supported file format is Barracuda.
    InnoDB: Log scan progressed past the checkpoint lsn 49439
    111209 17:28:19 InnoDB: Database was not shut down normally!
    InnoDB: Starting crash recovery.
    InnoDB: Reading tablespace information from the .ibd files...
    InnoDB: Restoring possible half-written data pages from the doublewrite
    InnoDB: buffer...
    InnoDB: Doing recovery: scanned up to log sequence number 1595675
    111209 17:28:19 InnoDB: Assertion failure in thread 140574630565664 in file fsp0fsp.c line 2101
    InnoDB: Failing assertion: inode
    InnoDB: We intentionally generate a memory trap.
    InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
    InnoDB: If you get repeated assertion failures or crashes, even
    InnoDB: immediately after the mysqld startup, there may be
    InnoDB: corruption in the InnoDB tablespace. Please refer to
    InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
    InnoDB: about forcing recovery.
    111209 17:28:19 - mysqld got signal 6 ;
    This could be because you hit a bug. It is also possible that this binary
    or one of the libraries it was linked against is corrupt, improperly built,
    or misconfigured. This error can also be caused by malfunctioning hardware.
    We will try our best to scrape up some info that will hopefully help diagnose
    the problem, but since we have already crashed, something is definitely wrong
    and this may fail.
    key_buffer_size=16777216
    read_buffer_size=262144
    max_used_connections=0
    max_threads=151
    thread_count=0
    connection_count=0
    It is possible that mysqld could use up to
    key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 134067 K
    bytes of memory
    Hope that's ok; if not, decrease some variables in the equation.
    Thread pointer: 0x0
    Attempting backtrace. You can use the following information to find out
    where mysqld died. If you see no messages after this, something went
    terribly wrong...
    stack_bottom = (nil) thread_stack 0x40000
    /usr/bin/mysqld(my_print_stacktrace+0x2e)[0x7882ae]
    /usr/bin/mysqld(handle_segfault+0x480)[0x516260]
    /lib/libpthread.so.0(+0xf850)[0x7fda1469d850]
    /lib/libc.so.6(gsignal+0x35)[0x7fda13362965]
    /lib/libc.so.6(abort+0x17b)[0x7fda13363ddb]
    /usr/bin/mysqld[0x506140]
    /usr/bin/mysqld[0x8599af]
    /usr/bin/mysqld[0x8671f8]
    /usr/bin/mysqld[0x82adc9]
    /usr/bin/mysqld[0x7d511c]
    /usr/bin/mysqld[0x7a2bd7]
    /usr/bin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x41)[0x66e171]
    /usr/bin/mysqld[0x58ff24]
    /usr/bin/mysqld(_Z11plugin_initPiPPci+0xc18)[0x595278]
    /usr/bin/mysqld[0x51b017]
    /usr/bin/mysqld(_Z11mysqld_mainiPPc+0x46d)[0x51e51d]
    /lib/libc.so.6(__libc_start_main+0xed)[0x7fda1334f17d]
    /usr/bin/mysqld[0x514a79]
    The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
    information that should help you find out what is causing the crash.
    111209 17:28:19 mysqld_safe mysqld from pid file /var/lib/mysql/lovelock.pid ended
    How do I fix this?
    Last edited by nikbhardwaj (2011-12-10 08:32:35)

    I have also tried uninstalling and re-installing to no avail.
    lovelock# pacman -Rdd mysql
    Remove (1): mysql-5.5.18-1
    Total Removed Size: 77.83 MB
    Do you want to remove these packages? [Y/n] y
    (1/1) removing mysql [#####################################################] 100%
    warning: /etc/mysql/my.cnf saved as /etc/mysql/my.cnf.pacsave
    lovelock# pacman -S mysql
    resolving dependencies...
    looking for inter-conflicts...
    Targets (1): mysql-5.5.18-1
    Total Download Size: 0.00 MB
    Total Installed Size: 77.83 MB
    Proceed with installation? [Y/n] y
    (1/1) checking package integrity [#####################################################] 100%
    (1/1) checking for file conflicts [#####################################################] 100%
    (1/1) installing mysql [#####################################################] 100%
    Installing MySQL system tables...
    OK
    Filling help tables...
    OK
    To start mysqld at boot time you have to copy
    support-files/mysql.server to the right place for your system
    PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
    To do so, start the server, then issue the following commands:
    /usr/bin/mysqladmin -u root password 'new-password'
    /usr/bin/mysqladmin -u root -h lovelock password 'new-password'
    Alternatively you can run:
    /usr/bin/mysql_secure_installation
    which will also give you the option of removing the test
    databases and anonymous user created by default. This is
    strongly recommended for production servers.
    See the manual for more instructions.
    You can start the MySQL daemon with:
    cd /usr ; /usr/bin/mysqld_safe &
    You can test the MySQL daemon with mysql-test-run.pl
    cd /usr/mysql-test ; perl mysql-test-run.pl
    Please report any problems with the /usr/scripts/mysqlbug script!
    Optional dependencies for mysql
    perl-dbi
    perl-dbd-mysql

Maybe you are looking for