Can't connect to mysql.sock?

Apache & Mysql both appear to be running fine.

However, whenever I attempt to connect to the webui, I get this message:

DBI->connect(dbname=rt2;host=localhost) failed: Can’t connect to local MySQL
server through socket ‘/usr/local/mysql/var/mysql.sock’
(13) at /usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Handle.pm
line 117
[Fri Sep 6 13:36:32 2002] [error] Connect Failed Can’t connect to local MySQL
server through socket ‘/usr/local/mysql/var/mysql.soc
k’ (13)
at /opt/rt/rt2/lib/RT.pm line 27

[sorry if this comes in a bit scrambled - I’m on a webmail interface and it
looks ugly]

Any ideas? If more input [config files, file permissions, etc.] needed, please
let me know!

Best regards,

Drew M. Mooney

Further to this - I AM able to connect to mysql via the command line as user
‘rtadm’ [the rt user and group name at my site]. Which ‘user’ is trying to
connect to mysql via the apache DBI?On Fri, 06 Sep 2002 11:52:36 -0700 dmmooney@earthlink.net wrote:

Apache & Mysql both appear to be running fine.

However, whenever I attempt to connect to the webui, I get this message:

DBI->connect(dbname=rt2;host=localhost) failed: Can’t connect to local MySQL
server through socket ‘/usr/local/mysql/var/mysql.sock’

(13) at /usr/local/lib/perl5/site_perl/5.8.0/DBIx/SearchBuilder/Handle.pm
line 117

[Fri Sep 6 13:36:32 2002] [error] Connect Failed Can’t connect to local MySQL
server through socket '/usr/local/mysql/var/mysql.soc

k’ (13)

at /opt/rt/rt2/lib/RT.pm line 27

[sorry if this comes in a bit scrambled - I’m on a webmail interface and it
looks ugly]

Any ideas? If more input [config files, file permissions, etc.] needed, please
let me know!

Best regards,

Drew M. Mooney

Apache & Mysql both appear to be running fine.

However, whenever I attempt to connect to the webui, I get this message:

DBI->connect(dbname=rt2;host=localhost) failed: Can’t connect to local MySQL
server through socket ‘/usr/local/mysql/var/mysql.sock’

Usually means the mysql socket file has gone away… you can confirm this
by trying a directory listing of /usr/local/mysql/var/mysql.sock

Or try manually connecting to mysql via a socket at the shell prompt:

% mysql

The solution is to shutdown mysql and restart it, and verify the socket
was created.

Is your web server on a different machine than mysql?On Fri, 6 Sep 2002, Drew Mooney wrote:

Further to this - I AM able to connect to mysql via the command line as user
‘rtadm’ [the rt user and group name at my site]. Which ‘user’ is trying to
connect to mysql via the apache DBI?

However, whenever I attempt to connect to the webui, I get this message:

DBI->connect(dbname=rt2;host=localhost) failed: Can’t connect to local MySQL
server through socket ‘/usr/local/mysql/var/mysql.sock’

Moses,

You were probably right. Unforturnately I took a heavy-handed approach
to fixing the problem BEFORE I read your reply. I was leaning towards a
permissions thing - and after reading your reply, found that
/usr/local/mysql/var was set to drwx------.

Even with /urs/local/mysql/var/mysql.sock set to srwxrwxrwx, the parent
directory probably locked out the apache-DBI user’s attempts to connect.

Thanks for your reply - The webUI is fine now - I’m just getting around
to playing with solaris 8 sendmail and wishing I was still running RT on
SuSE linux… :slight_smile:

regards,

Drew

Moses Leslie wrote: