From: Roger B. <rog...@te...> - 2002-04-20 18:29:08
|
Kevin, Thanks, we have more or less the same URL. You calling the mysql = database and I APRSstat. The problem is that when running this from my = mh it does not even try to connect, the server does not get any request. = With perl directly it works fine. I'm using mh 2.66 (I have also tried 2.60 and 2.62). The latest DBI and = DBD:mysql from CPAN. and SuSE 7.3. I'm lost. Regards Roger ----- Original Message -----=20 From: kevin wambsganz=20 To: 'Roger Bille' ; mis...@so...=20 Sent: Saturday, April 20, 2002 2:20 AM Subject: RE: [misterhouse-users] mh and mySQL I used a different URL to connect to mysql. I'm running SiSe Linux 7.3 = with mysql on the same server as mh. I connect using the following URL: my ($dbh) =3D DBI->connect('DBI:mysql:mysql', $my_username, = $my_passwd); my $sth =3D $dbh->prepare( "select * from analog_sensor")=20 . . . It works great, no problems!!! Kevin W.=20 -----Original Message----- From: mis...@li... = [mailto:mis...@li...]On Behalf Of Roger = Bille Sent: Friday, April 19, 2002 3:33 PM To: mis...@so... Subject: [misterhouse-users] mh and mySQL I have a strange problem with getting mySQL to work with mh. I have = had it working a year ago on different machines and software versions. It is related to the DBI->connect command. I don't get any error = messages but no code is executed after this command. I have tried this = test script: use DBI; print "Start\n"; my ($dbh) =3D DBI->connect("DBI:mysql:APRSstat", "mh", "mhpwd") = or die "Can't connect"; print "Connected\n"; my $sql =3D "CREATE TABLE Stat (ID INT NOT NULL PRIMARY KEY = AUTO_INCREMENT)"; print "SQL: $sql \n"; my $sth =3D $dbh->prepare($sql) or print "Can't prepare $sql: = $dbh->errstr\n"; $sth->execute() or print "can't execute the query: = $sth->errstr\n"; $sth->finish; $dbh->disconnect; When running with this command: mh -run testmysql.pl Start is printed but not Connected and none of the remaining code. = The same code is working fine with perl directly: perl testmysql.pl <=3D This is working =20 Regards Roger |