Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

What If SQL Name is different???

Quote Reply
What If SQL Name is different???
hi!
if my Links database in SQL is not called "Links" but something else, which parameters will i have to change in Parse_RDF.pl in order to get it to work?
Right now it doesnīt connect to the database and i believe the error is because of the different name. Thanks a lot in advance, Joe
Quote Reply
Re: What If SQL Name is different??? In reply to
You don't have to change anything. In the setup.cgi you need to enter the database as whatever your database is called, instead of Links. the parse program uses the Links.pm and thus the def files to determine what to do.

Quote Reply
Re: What If SQL Name is different??? In reply to
thanks, pugdog!
but how can i get this message then?
Connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (1
11) at Parse_RDF.pl line 81

line 79-89 read:
# First, Connect to the database, and prepare our insert queries that will add
# links and categories.
my $dbh_Links = DBI->connect(@dbi_Links) | | die "Connect: $DBI::errstr";
my $sth_Links = $dbh_Links->prepare("insert into Links (Title, URL, Add_Date, Mod_Date, CategoryID, Description, Contact_Name, Contact_Email, Hits, isNew, isPopular, Rating, Votes, ReceiveMail) values (?,?,'','',?,?,?,?,?,?,?,?,?,?)") | | die "Prepare: $DBI::errstr";
my $sth_Category = $dbh_Links->prepare("insert into Category (ID, Name, Description, Meta_Description, Meta_Keywords, Header, Footer, Number_of_Links, Has_New_Links) values (?,?,?,?,?,?,?,?,?)") | | die "Prepare: $DBI::errstr";
my $alt_cat = $dbh_Links->prepare("insert into CategoryAlternates (LinkID, CategoryID) VALUES (?, ?)");

my $max_id = $dbh_Links->prepare ("select ID from Category order by ID desc limit 1");
$max_id->execute();
($CATCNT) = $max_id->fetchrow_array();
$CATCNT++;


THANKS AGAIN IN ADVANCE!!
Quote Reply
Re: What If SQL Name is different??? In reply to
Sounds like you need to stop and restart MySQL. The mysql.sock error usually goes away if you do.

Quote Reply
Re: What If SQL Name is different??? In reply to
ok, i did that now and the error looks different now:
Connect: Unknown database 'Links' at Parse_RDF.pl line 81

do you think i have to change anything there?

thanks, joe