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

Unable to connect to SQL server

Quote Reply
Unable to connect to SQL server
I am having problems with Links SQL, today I got the following error when I use a links script that connects to SQL:

Fatal Error: Unable to connect to the SQL server. Reason: Access denied for user: 'links@localhost' (Using password: YES)

Can anyone help me.

Thanks Smile
Quote Reply
Re: Unable to connect to SQL server In reply to
One of the major errors is forgetting to reload/restart MySQL after changing the permissions. If you just created that account you need to make MySQL aware of the changes.

If that is not the problem, make sure you have the right 'user' set up in the 'user' and 'db' tables.

Quote Reply
Re: Unable to connect to SQL server In reply to
Hello!

I have had such problems and I would recommend to do one of the following:

1-Check all the directories def files and the scripts within admin and simply change the permission for a test to chmod 777 or 775 and try it out.

Later change back to what you want to find out if it was the problem.

2-check the details of every ' filled out in the server/user/password details. If one is missing anywhere which could be in use, nothing will work.

3-If you tried to drop your database and to recreate your database you do not have admin privilages. So if you did that once, you may need to talk to your ISP to drop and recreate it. May be thats what Alex meant. That happened in my case twice and I had to tell my ISP to do so. On a shared server, one may need to do this. I cannot beleive that Alex told you that you should ask your ISP to create tables for you. It may be the database and not tables.

4-If the database does not exists at all, which is most likely the case, then you do need to talk to your ISP.

5-Your ISP may have a system of passwords. Check out clrealy and in details, from all of those passwords, which has a full access(not just read and write only passwords).

To find out if at all your database exits do the following via telnet:

mysql -h YOUR/SERVER -u YOUR/USER/NAME -p

then type your password and see if you get in. After typing the password then connect to your database giving the name by changing the database. If both yes, the problem is in your script installation somewhere.

If you had the sucess in above, then you can run SQL.pl and see if it creates the tables for you. If not you need to focus on the line where it says user/password.

At this point, you should be fine.

Some of the things you may already know, but I am just repeating.

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











Quote Reply
Re: Unable to connect to SQL server In reply to
Thanks PugDog.

The only problem is that it looks that the table that I was using is lost.

When I type: mysqlshow I don't see it, do you have an explanation on why happen this problem.

Also I have talked with Alex about building a new table to use in links SQL, but he says that my ISP needs to built one.

What is the purpose to use SQL.cgi, if my ISP needs to built a table, is Alex right, or I can build a new table using SQL.cgi.

Thanks
Quote Reply
Re: Unable to connect to SQL server In reply to
Whoa, hold yer horses there.

1. if a login through mysqlshow is not showing your tables, changing permissions with only serve to open holes in your security.

2. once again, if you manage to use mysqlshow to show the other tables, finding a lost table will not happen by fiddling with configuration

3. Alex is correct, there are some cases where accounts are not allowed to drop/create tables. Though a isp that does such a thing has a rather draconian way of doing things

4, 5 seem like possibilities

Anyhow, SQL.pl's purpose is to build all the tables in the database and also write up all the database definition files. (the files located in the links/cgi-bin/admin/defs directory)

I've seen one site with the rpm and the src distributions both installed. (eek!!!!), if they rebooted and restarted the wrong one (meaning that they point to the wrong data dir) that sort of error could very well occur.

Good luck
Quote Reply
Re: Unable to connect to SQL server In reply to
Thanks to everyone, the problem was that mysql was restarted using other directory, thanks to Alex that help me solve the problem.

With this comand you can see if you have the right data directory: mysqladmin var