RE: help with socket setting problem

2005-11-09 Thread Paul DuBois

At 22:38 -0500 11/8/05, [EMAIL PROTECTED] wrote:

There can also be a [mysql] section that will apply to all applications
that read the my.cnf file. It is sort of the "default" section.


Eh?

The [mysql] section applies to the mysql client program and not
to anything else.



[mysql]
socket=/tmp/mysql.sock

[mysqld]
datadir=/var/lib/mysql
socket=/tmp/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib
socket=/tmp/mysql.sock

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
socket=/tmp/mysql.sock



I put the same socket location into EACH section. Yes it's overkill but it
makes sure that no matter which section a particular program reads, it
sees the same socket location. Make sense? If you need multiple  sockets
(because you are running multiple servers) this setup will not work for
you. But, since I do not think you run multiple servers on the same
machine, we should be safe.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


"David Inglis" <[EMAIL PROTECTED]> wrote on 11/08/2005
09:58:09 PM:


 Thanks for your prompt reply

 I have tried a few different things and looked at the docs your pointed

me

 to still no luck

 here is the my.cnf file

 [mysqld]
 datadir=/var/lib/mysql
 socket=/tmp/mysql.sock

 [mysql.server]
 user=mysql
 basedir=/var/lib

 [safe_mysqld]
 err-log=/var/log/mysqld.log
 pid-file=/var/run/mysqld/mysqld.pid


 My version is server version: 3.23.36 on redhat linux


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 9 November 2005 1:47 PM
 To: David Inglis
 Cc: mysql@lists.mysql.com
 Subject: Re: help with socket setting problem


 "David Inglis" <[EMAIL PROTECTED]> wrote on 11/08/2005
 09:33:27 PM:

 > I am having the following problem
 >
 > with the setting for socket in the my.cnf configuration file  set to
 > socket=/tmp/mysql.sock I am able to connect through a browser but

cannot

 > connect using the mysql client  when I change it to
 > socket=/var/lib/mysql/mysql.sock I can access through mysql client but
 not
 > through a browser connection
 >
 > How can I fix this any help appreciated.
 >
 >
 >
 > Regards
 >
 >
 >
 > David Inglis

 There is more than one section in the my.cnf file. Make sure you
 coordinate both the client section and the server section to use the

same

 socket. All clients also have some means of specifying where to look to
 try to connect to a server. If you tell the server to create a socket

file

 in one place, and your client defaults to looking somewhere else, tell

it

 where to look.

 Since you didn't say which version you are on, this is a link to the

4.1-

 docs (but this section is identical for 5.0+)

 http://dev.mysql.com/doc/refman/4.1/en/program-options.html

 Shawn Green
 Database Administrator
 Unimin Corporation - Spruce Pine



--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: help with socket setting problem

2005-11-08 Thread SGreen
There can also be a [mysql] section that will apply to all applications 
that read the my.cnf file. It is sort of the "default" section.

[mysql]
socket=/tmp/mysql.sock

[mysqld]
datadir=/var/lib/mysql
socket=/tmp/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib
socket=/tmp/mysql.sock

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
socket=/tmp/mysql.sock



I put the same socket location into EACH section. Yes it's overkill but it 
makes sure that no matter which section a particular program reads, it 
sees the same socket location. Make sense? If you need multiple  sockets 
(because you are running multiple servers) this setup will not work for 
you. But, since I do not think you run multiple servers on the same 
machine, we should be safe.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


"David Inglis" <[EMAIL PROTECTED]> wrote on 11/08/2005 
09:58:09 PM:

> Thanks for your prompt reply
> 
> I have tried a few different things and looked at the docs your pointed 
me
> to still no luck
> 
> here is the my.cnf file
> 
> [mysqld]
> datadir=/var/lib/mysql
> socket=/tmp/mysql.sock
> 
> [mysql.server]
> user=mysql
> basedir=/var/lib
> 
> [safe_mysqld]
> err-log=/var/log/mysqld.log
> pid-file=/var/run/mysqld/mysqld.pid
> 
> 
> My version is server version: 3.23.36 on redhat linux
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 9 November 2005 1:47 PM
> To: David Inglis
> Cc: mysql@lists.mysql.com
> Subject: Re: help with socket setting problem
> 
> 
> "David Inglis" <[EMAIL PROTECTED]> wrote on 11/08/2005
> 09:33:27 PM:
> 
> > I am having the following problem
> >
> > with the setting for socket in the my.cnf configuration file  set to
> > socket=/tmp/mysql.sock I am able to connect through a browser but 
cannot
> > connect using the mysql client  when I change it to
> > socket=/var/lib/mysql/mysql.sock I can access through mysql client but
> not
> > through a browser connection
> >
> > How can I fix this any help appreciated.
> >
> >
> >
> > Regards
> >
> >
> >
> > David Inglis
> 
> There is more than one section in the my.cnf file. Make sure you
> coordinate both the client section and the server section to use the 
same
> socket. All clients also have some means of specifying where to look to
> try to connect to a server. If you tell the server to create a socket 
file
> in one place, and your client defaults to looking somewhere else, tell 
it
> where to look.
> 
> Since you didn't say which version you are on, this is a link to the 
4.1-
> docs (but this section is identical for 5.0+)
> 
> http://dev.mysql.com/doc/refman/4.1/en/program-options.html
> 
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine


Re: help with socket setting problem

2005-11-08 Thread SGreen
"David Inglis" <[EMAIL PROTECTED]> wrote on 11/08/2005 
09:33:27 PM:

> I am having the following problem
> 
> with the setting for socket in the my.cnf configuration file  set to
> socket=/tmp/mysql.sock I am able to connect through a browser but cannot
> connect using the mysql client  when I change it to
> socket=/var/lib/mysql/mysql.sock I can access through mysql client but 
not
> through a browser connection
> 
> How can I fix this any help appreciated.
> 
> 
> 
> Regards
> 
> 
> 
> David Inglis

There is more than one section in the my.cnf file. Make sure you 
coordinate both the client section and the server section to use the same 
socket. All clients also have some means of specifying where to look to 
try to connect to a server. If you tell the server to create a socket file 
in one place, and your client defaults to looking somewhere else, tell it 
where to look.

Since you didn't say which version you are on, this is a link to the 4.1- 
docs (but this section is identical for 5.0+)

http://dev.mysql.com/doc/refman/4.1/en/program-options.html

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine