--- [EMAIL PROTECTED] wrote: > >Description: > When connecting to mysql database using Perl DBI AND specifying a > mysql_read_default_file, this causes a Segmentation Fault. However > if a mysql_read_default_file is not used then no error occurs. > Linux version is 7.2 Redhat and DBI and DBD-mysql were installed from > redhat.com > and installed without errors. > >How-To-Repeat: > #!/usr/local/bin/perl -w > > use DBI; > > my $dbh= > DBI->connect("DBI:mysql:buxt;mysql_read_default_file=/home/buxton/main.cnf");
Why don't you try this: ----------------------------------------------------------------------- require 'database.cfg'; # Try to connect to the database or exit with message "Can't create access to database" $dbh = DBI->connect("DBI:mysql:$DSN", $mySQL_user, $mySQL_password) or die "Can't create access to database: $DSN.<BR>\n"; ----------------------------------------------------------------------- ************************* database.cfg **************************** $DSN= "buxt"; $mySQL_user = "test"; $mySQL_password = "testpass"; ----------------------------------------------------------------------- > > main.cnf contains > [client] > user=test > password=testpass > > > >Fix: > put User and Password in connect statement > >Submitter-Id: <submitter ID> > >Originator: Ray Norrish, [EMAIL PROTECTED] > >Organization: Portjile Pty Ltd > >MySQL support: None > >Synopsis: Connect fails using DBI when a options file is specified > (Core Dump) > >Severity: serious > >Priority: medium > >Category: mysql > >Class: sw-bug > >Release: mysql-3.23.49a (Official MySQL RPM) > > >Environment: > Pentium based server running Redhat 7.2 > libraries: > perl-Digest-MD5-2.13-1 > perl-MIME-Base64-2.12-6 > perl-libwww-perl-5.53-3 > perl-libxml-perl-0.07-5 > groff-perl-1.17.2-7.0.2 > perl-CPAN-1.59_54-26.72.3 > perl-DBI-1.14-10 > perl-DateManip-5.39-5 > perl-HTML-Tagset-3.03-3 > perl-libnet-1.0703-6 > perl-Parse-Yapp-1.04-3 > perl-URI-1.12-5 > perl-XML-Encoding-1.01-2 > perl-XML-Parser-2.30-7 > perl-libxml-enno-1.02-5 > perl-XML-Twig-2.02-2 > perl-DB_File-1.75-26.72.3 > mod_perl-1.26-2 > perl-DBD-MySQL-1.2215-1 > perl-5.6.1-26.72.3 > perl-CGI-2.752-26.72.3 > perl-HTML-Parser-3.25-2 > perl-Storable-0.6.11-6 > perl-XML-Grove-0.46alpha-3 > perl-XML-Dumper-0.4-5 > perl-SGMLSpm-1.03ii-4 > perl-NDBM_File-1.75-26.72.3 > > System: Linux amulet.com.au 2.4.18 #1 SMP Mon Mar 18 13:50:53 EST > 2002 i686 unknown > Architecture: i686 > > Some paths: /usr/local/bin/perl /usr/bin/make /usr/bin/gmake > /usr/bin/gcc /usr/bin/cc > GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs > gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98) > Compilation info: CC='gcc' CFLAGS='-O6 -fno-omit-frame-pointer > -mpentium' CXX='gcc' CXXFLAGS='-O6 -fno-omit-frame-pointer > -felide-constructors -fno-exceptions -fno-rtti -mpentium' > LDFLAGS='' > LIBC: > lrwxrwxrwx 1 root root 13 Jan 24 17:01 > /lib/libc.so.6 -> libc-2.2.4.so > -rwxr-xr-x 1 root root 1283964 Dec 9 01:14 > /lib/libc-2.2.4.so > -rw-r--r-- 1 root root 27314296 Dec 9 01:02 > /usr/lib/libc.a > -rw-r--r-- 1 root root 178 Dec 9 01:02 > /usr/lib/libc.so > Configure command: ./configure --disable-shared > --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static > --with-other-libc=/usr/local/mysql-glibc --without-berkeley-db > --without-innodb --enable-assembler --enable-local-infile > --with-mysqld-user=mysql > --with-unix-socket-path=/var/lib/mysql/mysql.sock --prefix=/ > --with-extra-charsets=complex --exec-prefix=/usr > --libexecdir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share > --localstatedir=/var/lib/mysql --infodir=/usr/info > --includedir=/usr/include --mandir=/usr/man '--with-comment=Official > MySQL RPM' CC=gcc 'CFLAGS=-O6 -fno-omit-frame-pointer -mpentium' > 'CXXFLAGS=-O6 -fno-omit-frame-pointer -felide-constructors > -fno-exceptions -fno-rtti -mpentium' CXX=gcc > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php