List Info

Thread: problem while connecting to mysql using perl




problem while connecting to mysql using perl
country flaguser name
United States
1969-12-31 18:00:00

Hi,

I have perl - v5.8.4 and gcc version 3.4.6 installed on solaris 10.

I need to connect to mysql using perl and installed DBI module
for the purpose.

But while installing DBD::Mysql using gcc "/usr/perl5/bin/perlgcc
Makefile.PL" and on "make" I am getting errors which reads as follows.

====================================================================

-bash-3.00# make

gcc -c -I/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI
-I/usr/sfw/include/mysql -xstrconst -mt -DDBD_MYSQL_INSERT_ID_IS_GOOD -g
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -O2
-fno-strict-aliasing -DVERSION="4.004" -DXS_VERSION="4.004"
-fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE" dbdimp.c

gcc: language strconst not recognized

gcc: dbdimp.c: linker input file unused because linking not done

gcc -c -I/usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI
-I/usr/sfw/include/mysql -xstrconst -mt -DDBD_MYSQL_INSERT_ID_IS_GOOD -g
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TS_ERRNO -O2
-fno-strict-aliasing -DVERSION="4.004" -DXS_VERSION="4.004"
-fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/CORE" mysql.c

gcc: language strconst not recognized

gcc: mysql.c: linker input file unused because linking not done

rm -f blib/arch/auto/DBD/mysql/mysql.so

LD_RUN_PATH="/usr/sfw/lib:/usr/lib:/lib" /usr/perl5/5.8.4/bin/perl myld
gcc -G dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so
-R/usr/sfw/lib -R/usr/sfw/lib/mysql -L/usr/sfw/lib -L/usr/sfw/lib/mysql
-lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm

gcc: dbdimp.o: No such file or directory

gcc: mysql.o: No such file or directory

*** Error code 1

make: Fatal error: Command failed for target
`blib/arch/auto/DBD/mysql/mysql.so'

====================================================================

I am unable to find any solution for this as I don't have CC compiler
and with gcc this is not working.

To over come the problem I thought of installing NET::Mysql and written
simple script to test the connectivity.

---------------------------------

use Net::MySQL;

use strict;

my $mysql = Net::MySQL->new(

#unixsocket => '3306',

user => 'root',

hostname => '10.10.7.25',

database => 'mysql',

password => '123456',

);

----------------------------------

On executing I am getting following error.

# perl checkmysql.pl

Access denied for user: 'mfin-sol01' to database '!' at checkmysql.pl
line 4

Some one please help me to solve this problem, I am lost.

Thanks in advance for any help.

Regards,

Ramesh.

Ramesh Polepalli

mFormation Technologies Inc.
Direct Line: +91 80 6620 5939
Switchboard: +91 80 6620 5900

http://www.mformation.com


Visit WWW.MFORMATION.COM and see how the MFORMATION SERVICE MANAGER can help you to transform your business.

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )