Thanks syburgh, you have set me on the right path.
I thought I could use some of the plugin code, but I found that I must
reference DBI directly without referencing Slim.
I also had to explicitly define the socket in the connection string.
Anyway, the Perl code to execute SQL statements against the SS MySQL
instance is:
Code:
--------------------
use DBI;
my $dbh =
DBI->connect('DBI:mysql:host=localhost:mysql_socket=slimnas/var/slimserver/slimserver-mysql.sock;database=slimserver');
my $sth = $dbh->prepare( "<type destructive SQL statement here>" );
$sth->execute();
--------------------
Cheers,
c0utta
--
c0utta
------------------------------------------------------------------------
c0utta's Profile: http://forums.slimdevices.com/member.php?userid=14341
View this thread: http://forums.slimdevices.com/showthread.php?t=43249
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/unix