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

perl setup.cgi (problem)

Quote Reply
perl setup.cgi (problem)
CUT & PASTE is as follows:
( easy solution ? )

Thanks,
Daywizard

[root@daywizard setup]# perl setup.cgi
Welcome to Links SQL Setup!
---------------------------

Checking for required modules:
CGI.pm ... version 2.56 ok!
DBI.pm ... version 1.13 ok!
Links.pm ... ok!

Database connection information.
Enter the name of your database driver [mysql]:
SQL.mysql file loaded.
DBD::mysql ... ok!
Enter the database name [test]:
Enter the database user name [undef]:
Enter the database password [undef]:
Enter the name of the database server [localhost]:

Creating Links: BSQL Database object.
Loading ... ok!

Connecting to the database.
Unable to connect! Error message:
DBSQL (832): Fatal Error: Unable to connect to the SQL server. Reason: C
an't connect to local MySQL server through socket '/tmp/mysql.sock' (111) at set
up.cgi line 240


Aborting.. please confirm your database connection information.
[root@daywizard setup]# perl setup.cgi
Welcome to Links SQL Setup!
---------------------------

Checking for required modules:
CGI.pm ... version 2.56 ok!
DBI.pm ... version 1.13 ok!
Links.pm ... ok!

Database connection information.
Enter the name of your database driver [mysql]:
SQL.mysql file loaded.
DBD::mysql ... ok!
Enter the database name [test]:
Enter the database user name [undef]: root
Enter the database password [undef]: daywizzy
Enter the name of the database server [localhost]:

Creating Links: BSQL Database object.
Loading ... ok!

Connecting to the database.
Unable to connect! Error message:
DBSQL (833): Fatal Error: Unable to connect to the SQL server. Reason: C
an't connect to local MySQL server through socket '/tmp/mysql.sock' (111) at set
up.cgi line 240

Aborting.. please confirm your database connection information.
[root@daywizard setup]#
Quote Reply
Re: perl setup.cgi (problem) In reply to
 
Quote:
Unable to connect! Error message:
DBSQL (833): Fatal Error: Unable to connect to the SQL server. Reason: C
an't connect to local MySQL server through socket '/tmp/mysql.sock' (111) at set
up.cgi line 240

Are you sure mysql is up and running? Sounds like it isn't..

Cheers,

Alex
Quote Reply
Re: perl setup.cgi (problem) In reply to
MySQL is running, in setup (upon boot) under RH6.1 it loads up, and then I run it from the command line:

[root@daywizzy setup]# mysql -uroot -pdaywizzy
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 3.22.32

Type 'help' for help.

mysql>


---> in another task I do 'perl setup.cgi' and still have this problem...

[root@daywizzy setup]# perl setup.cgi
Welcome to Links SQL Setup!
---------------------------

Checking for required modules:
CGI.pm ... version 2.56 ok!
DBI.pm ... version 1.07 ok!
Links.pm ... ok!

Database connection information.
Enter the name of your database driver [mysql]:
SQL.mysql file loaded.
DBD::mysql ... ok!
Enter the database name [test]:
Enter the database user name [undef]:
Enter the database password [undef]:
Enter the name of the database server [localhost]:

Creating Links: BSQL Database object.
Loading ... ok!

Connecting to the database.
Unable to connect! Error message:
DBSQL (3012): Fatal Error: Unable to connect to the SQL server. Reason: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) at setup.cgi line 240


Aborting.. please confirm your database connection information.
[root@daywizzy setup]#

Perl DBI problem?
DBSQL MySQL problem?

Either way, it is unable to 'connect'.

Let me know what you think.

Thank you.



------------------
e-mail: daywizard@yahoo.com
Quote Reply
Re: perl setup.cgi (problem) In reply to
Check out


http://www.gossamer-threads.com/scripts/forum/resources/Forum9/HTML/000337.html


or do a search for mysql.sock in the Links SQL forum -- there are a few threads on it.

Quote Reply
Re: perl setup.cgi (problem) In reply to
Hmm, could be DBD::mysql module is not installed correctly. For instance if mysql is setup to use /var/lib/mysql/mysql.sock as the sock file, but the default for DBD::mysql is /tmp/mysql.sock, you'll have problems. Also, make sure permissions aren't overly restrictive on the mysql.sock file (i.e. it's only readable by mysqld).

Try typing 'mysqladmin vars' to see where mysql thinks the sock file is.

Cheers,

Alex