Gossamer Forum
Home : Products : Gossamer Links : Discussions :

LSQL & Mysql5 Problem with Socket

Quote Reply
LSQL & Mysql5 Problem with Socket
I try to move our site to a new server.
There we have new conditions for mysql.
The port is 3316 and the socketīs name is: /tmp/mysql5.socket

I tried a lot of things, but i cant connect to mysql.

The error message is:

Error:Could not connect to database: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


But from where is this information? I have searched all LSQL-Files and there is nowhere anything with "/var/run/mysqld/mysqld.sock" This information should come from outside the script, but from where?


Any idea?
Quote Reply
Re: [Robert] LSQL & Mysql5 Problem with Socket In reply to
Hi,

Why are you trying to connect from something other than "localhost"?

If you login via SSH/Telnet, and type:

Code:
mysql

what do you see?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] LSQL & Mysql5 Problem with Socket In reply to
The problem is that the hoster has compiled mysql with a wrong socket and/or has a wrong info in /etc/my.cnf
Because it is a managed server i could not do a symlink or anything else.
The trick to solve the thing so far is:


## New
BEGIN {
$ENV{MYSQL_UNIX_PORT}='/tmp/mysql5.sock';
};
####
use strict;


I put this to the top of setup.cgi and admin.cgi and i am still testing.
Quote Reply
Re: [Robert] LSQL & Mysql5 Problem with Socket In reply to
Ah ok. Well if its a managed server, why don't you just ask them to add the symlink? Whistle

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] LSQL & Mysql5 Problem with Socket In reply to
Managed server means that they do absolutely nothing for you.
And so i have still the problem to make MySQLMan running.
LSQL is solved, i can change somewhere the adress for the socket, but for MYSQLMan i have not found the right place to change it.
I really hope that someone knows where to enter this certain line in the script to tell it which socket should be choosed,
because i love and need the MYSQLMAN and MYSQLMonitor for short things all the time.

Quote Reply
Re: [Robert] LSQL & Mysql5 Problem with Socket In reply to
Hi,

Well your host has a very odd idea of "managed" servers in that case Whistle Every one I have used that claims to be "managed", would have no problem in creating a symlink for you. Are you sure you don't mean "shared" ? i.e there are multiple clients on the same server.

Code:
but for MYSQLMan i have not found the right place to change it.

Have you tried doing your "tweak" in /admin/mysqlman/mysql.cgi ?

Quote:
and need the MYSQLMAN and MYSQLMonitor for short things all the time.

You can still use Database > SQL Monitor (this uses the same connection as the admin panel)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!