On Wed, 4 May 2005, Fraser Baker wrote:

Need Help!

I've really tried hard to get connected to msql. I am using trustix 2.2.
Pretty much everything is working now, except for connecting to mysql. I
believe the problem related to DBI.

What I don't understand is why DBI isn't working straight up?

Well, that's because mysql, perl, apache are actually quite complicated!
If it was easy... well, then... actually I am thoroughly convinced now that linux-apache-mysql-perl is SIMPLER than ANY equivalent Windows set up... but let's not get into that now!


First off are you sure that mysql is working and that you can connect to it??? Use 'mysql' as a client and get all that going first.

I believe the related perl modules installed are:
perl-dbi-1.45-2tr and
perl-dbd-sqlite-1.07-2tr

Fraser, 'sqlite' is a totally different database, it has NOTHING to do with mysql. Forget it! See www.sqlite.org. You must have perl-dbd-mysql module installed.


I think you should back out the changes made by trying to install
DBI from CPAN. It probably added stuff in /usr/lib/perl5/site_perl/5.85/
Nuke it. I find that working with packages AND installing the same modules from CPAN complicates my life too much; I do one or the other.
If you absolutely must use CPAN, first remove the related RPM's.
Then add the CPAN modules. I am never certain which ones it will find
and use otherwise; the perl search path INC determines that but who has
time to deal with that??


Since you are apparently new at this, give the Trustix guys a little more of a chance! They do good work! So nuke your CPAN additions
and then re-install the Trustix packages.


After deleting the appropriate CPAN files in /usr/lib5/perl/site_perl area

Remove the existing RPM packages --

        rpm -e perl-dbi perl-dbd-sqlite

If there are other dbd packages rpm will complain; remove them too.
Then add the right stuff back

swup --install perl-dbd-mysql (and any other perl-dbd-* that you NEED -- NOT sqlite)

That should be enough -- since perl-dbd-mysql depends on perl-dbi-*
swup should figure out the dependency and install what is needed.

Once it's installed I heartily suggest you write a short perl script (3 line)
to test the connection instead of hacking away adding symlinks etc
to make someone elses script work. If you need help with the scriptlet, ask.

Test each portion in isolation.

1 mysql, 2 perl, 3 perl DBI, 4 apache cgi

Good luck and keep at it!

--
Brian Wilson
Corvallis, Oregon
541-368-4120



_______________________________________________
tsl-discuss mailing list
[email protected]
http://lists.trustix.org/mailman/listinfo/tsl-discuss

Reply via email to