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

Can't connect, no database driver specified at Links/DBSQL.pm line 171

Quote Reply
Can't connect, no database driver specified at Links/DBSQL.pm line 171
Let's start new threads with problems, things are getting too deeply burried.

That's a very common error Smile If you re-install and forget to follow the instructions.

Link 171 is:
Code:
$db->connect (['DBI:mysql:links:localhost', $user, $pass]);

in that line, the single quotes mean no interpretation by perl will occur, so that part will be passed to the routine directly.
therefore, 'mysql' must be the database installed and 'links' must be the database name. You must also be on 'localhost'. The $user and $pass are from the setup you did in the SQL.pl file, and are inserted at the top of several of the files in the defs directory.

If you change the password -- you must edit those files and make sure they have the correct user and password.

Quote Reply
Re: Can't connect, no database driver specified at Links/DBSQL.pm line 171 In reply to
Hello Mr. Pataki!

You are aware of my stalemate and would like to thankyou for your support.

Your suggestion does not help. I have already done this change FIRST! It still gives the error. I mean I have changed this line

$db->connect (['DBI:mysql:links:localhost', $user, $pass]);

in SQL.pl already. Only then I transfered to web in ASCII format and changed the permissions. So it did not help me.

Do you know any other command if I for e.g. I write

>perl my darling
>perl my do not dance
>perl my make my life simple?;

Will perl understand?

------------------
rajani











Quote Reply
Re: Can't connect, no database driver specified at Links/DBSQL.pm line 171 In reply to
Did you change the line in SQL.pl *THEN* run it? Check your defs directory and make sure the top of each of the files is correct.

Then make sure that the database table 'links' actually exists.

Quote Reply
Re: Can't connect, no database driver specified at Links/DBSQL.pm line 171 In reply to
Hello Mr. Pataki!

When I received the Multi_Category mod the first thing I did was to erase the defs from its directory. All of this. Because the very purpose of the new mod is multi category mod and looking in to the SQL.pl it was supposed to create a new table of Category.Alternates. There I noticed that Alex commented

#Category Relations and followed by Category. Alternate programming. But I understood and removed all the necessary files.

Also I substituted all the files which Alex had send me thinking that they were the only ones which needed to be changed.

Then ofcourse the local host, user and passwords needed to be changed everywhere whereever it may be. So I hunted in all the files before I started enjoying the programming and ofcourse at that time I was not aware of the frustration to follow. This I found in SQL.pl only and literally copied that line from the old SQL.pl in to new one taking care of if there is an extra space at the end of the line not to be copied, as perl can may be give problems.

Then I also checked in to links.pm and saw there was nothing to be changed there.

After Alex told me to drop and create the tables, I droped all the tables from the database. Now the database is showing empty without any tables.
Quote:
Alex wrote :
1. Erase *.def in your defs folder.
2. Drop and recreate your Links SQL database.
3. Run SQL.pl
So I have droped the tables but not recreated the new database. I do not know if this is the problem, however as a novice I beleive this CANNOT be a problem. There is an existing database with or without the tables. Even in an existing anathor database I can insert an run Links SQL on it or with it so long as the links SQL and the database can romance with each other in terms of exact compatible of configurations and table names etc. However I could be wrong.

What I do not understand is why does one need to create a new links table. Thats the job of this script SQL.pl! When I try to create a new table of links it starts to ask me how many fields etc.

What I do not understand is "recreate the database". Does this mean do I have to recreate all the tables manually, with all those detailed configurations? I can do this but then I do not understand why is SQL.pl for?

Also SQL.pl give endless a compilation errors in all those lines written in my thread earlier. Line 25, 29, 60, 35, 63 etc. I cannot execute it. It does not run. If it runs there comes the question of if it can connetc to the database or not. However I do not have a lot of experience of getting perl scripts installation and execution.

So in a nutshell,

All the scripts are always uploaded in ASCII mod. All file permissions are checked. The user and the passwords are written exactly where they should be and in the suggested manner and also in the respective files. Paths are also correct in Links.pm There are no defs in the defs directory. SQL.pl is executable. No tables in the database.

Could be any problem somewhere there? or beyond?

Can there be a virus in the database? ( Wink)

------------------
rajani











Quote Reply
Re: Can't connect, no database driver specified at Links/DBSQL.pm line 171 In reply to
In mysql you need to create a _database_ called 'links' It is into this that LinkSQL inserts the tables.

mysql has two default databases set up test and mysql I belive. You need to add to that a database called 'links'

It's to this database that SQL.pl attaches and starts to create tables.

I had no trouble using the admin script I told you about to drop/create tables. It requires no set up, and it works. It allows you to browse the databases and tables very easily from your browser. Just put it in your links admin directory and it's password protected like your admin scripts. Log on to it, pick "New Database" and enter 'links' then submit and you are ready to run SQL.pl

Quote Reply
Re: Can't connect, no database driver specified at Links/DBSQL.pm line 171 In reply to
Feel free to email me. I'm sure this is just one of those things you've overlooked. Sometimes someone else can see it directly.



------------------
Robert S. Pataki, MD
President, PUGDOG Enterprises, Inc.
http://www.postcards.com
Quote Reply
Re: Can't connect, no database driver specified at Links/DBSQL.pm line 171 In reply to
Hello Mr. Pataki!

Thanks for your response.

But I have problems to agree with you, may be someone can explain me or you better.

Seems like Alex does not want to enter in to this discussion, offer no support and help me at all. If that would be the case I would be very surprised.

You can create any number of databases and give them any name you want so long as you tell the defs the name of the databasesa and supply the relative passwords and user names. So there is literally no restriction in naming the database.

The database I have exists. Question was only to drop the tables and recreate them. This is also because there seems to be a little different configuration of the tables for e.g. new Alternate Table has now appeared or must be configured. Thats the job of SQL.pl

The problem is that there seems to be a bug in DBSQL.pm and SQL.pl. Either there has been some problem in zipping unzipping of in the installation.

There is for me no other thing to think about. Either the original that I have have some problems from the begining.

Mr. Pataki, My databse works with the old Links SQL v1.0 and that did not have the name links but something elso. However I am not aware that Alex has restricted this name that one can only use it with links name of the database. Cannot be, just cannot be. Ofcourse there may be the default databases as you said in MySQL.
Quote:
I had no trouble using the admin script I told you about to drop/create tables.
I also have no troubles to drag and play with the tables. They are all php3 based templates. It works perfect.

So the problem I have is not really anything elso but probably a problematic situation that becomes hard to say publicly.

------------------
rajani











Quote Reply
Re: Can't connect, no database driver specified at Links/DBSQL.pm line 171 In reply to
Sorry about the troubles, perhaps I was a bit too brief. Here are the steps you should take to start with a clean database. I'll assume your database name is database, your username is username and your password is password.

1. Drop your existing database:

# mysqladmin -uusername -ppassword drop database

2. Recreate the datbabase:

# mysqladmin -uusername -ppassword create database

3. Edit SQL.pl and setup your DBI connect statement.

'DBI:mysq:database:localhost', 'username', 'password'

4. Run SQL.pl

# perl SQL.pl

and you should be set. If you don't want to erase old unused tables, you can use:

# perl SQL.pl -d

and it will drop the table before it recreates it. You can also do this if you don't have permission to create/drop databases.

Hope this helps,

Alex
Quote Reply
Re: Can't connect, no database driver specified at Links/DBSQL.pm line 171 In reply to
 
Quote:
Seems like Alex does not want to enter in to this discussion, offer no support and help me at all. If that would be the case I would be very surprised.

I do try to take the occassional weekend off to keep myself sane. Wink

Cheers,

Alex
Quote Reply
Re: Can't connect, no database driver specified at Links/DBSQL.pm line 171 In reply to
Hello Alex!

Thanks for replying!

My problem is creating a new database. I have droped all the tables. So the database is empty. Now if I run the SQL.pl it should also create all the new tables within the existing database with no tables, isnt it? Second problem is why does not the SQL.pl run? It always says compilation errors. In my earlier thread I have listed the lines or errors. I do not understand why. Because I give

>perl SQL.pl

gives compilation errors in lines 25,29,35,....

Or if I try,

> perl -de SQL.pl

It gives the same errors.

It does not give any result. However now I have request for a special attention for creating a new database and start from scratch. Will let know if creating a new database works. Actually, the three "Holy Mantras" you gave me was really to the point when I hunted madly to find out what did you mean and once I did it was not complicated at all to do them.

My second problem is my provider does not allow admin on MySQL for security reasons! Let them create and drop.

Anyway, Thanks Mr. Pataki! Yes, there has to be something that I have overlooked. You are most probably right. You know sometimes I do make such mistakes. But now I have chanted the "Three Holy Mantra of Alex" so many times that even if I made a mistake I myself would not realize!!! So actually its good to write to you and discuss, most of all, asking myself have I done correct before wasting the time of yours or Alex. Wink

------------------
rajani











Quote Reply
Re: Can't connect, no database driver specified at Links/DBSQL.pm line 171 In reply to
 
Quote:
gives compilation errors in lines 25,29,35,....

It would help if you cut and paste the actual error message that is displayed.

Cheers,

Alex