MySQL socket and logs locations

2006-09-24 Thread Peter Bradley

Hi,

I've installed MySQL 5.0.24a-standard on my AMD 64, SuSE 10.0 box, using 
the binary distribution from the MySQL downloads site.  I've also 
installed the GUI tools from the same location, using the SuSE 10.x rpm 
packages.  The intention is to use MySQL with PHP5 and Apache.  Both 
these latter have been installed from the SuSE rpm files supplied on DVD 
with SuSE 10.0.  I have a couple of problems. 

Firstly, PHP seems to want the mysql.sock file to be in 
/var/lib/mysql/mysql.sock - at least this is the location given by 
phpinfo() - instead of /tmp/mysql.sock.  This location appears to be 
contained in an environment variable called MYSQL_SOCKET, but I can't 
find where it is set.  One solution would be to get MySQL to put the 
mysql.sock file in the place expected by PHP.  Is this possible?


At the moment, I have a /etc/my.cnf file with the following content:

[mysqld]
socket=/tmp/mysql.sock

[client]
socket=/tmp/mysql.sock

I added these entries in an attempt to get PHP to use the actual 
location that MySQL is using, but this doesn't appear to have had any 
effect (according to phpinfo()).


Secondly, MySQL appears to be trying to write logs to /var/log/mysql 
(according to MySQL Administrator).  This location does not exist.  I'm 
getting no error messages, but presumably this means I'm not getting any 
logs either.  Should I create this location and if so, what permissions 
and ownership should I give to the directory?


Thanks in advance


Peter


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



Re: MySQL socket and logs locations

2006-09-24 Thread Russbucket
Peter Bradley wrote:

 Hi,
 
 I've installed MySQL 5.0.24a-standard on my AMD 64, SuSE 10.0 box, using
 the binary distribution from the MySQL downloads site.  I've also
 installed the GUI tools from the same location, using the SuSE 10.x rpm
 packages.  The intention is to use MySQL with PHP5 and Apache.  Both
 these latter have been installed from the SuSE rpm files supplied on DVD
 with SuSE 10.0.  I have a couple of problems.
 
 Firstly, PHP seems to want the mysql.sock file to be in
 /var/lib/mysql/mysql.sock - at least this is the location given by
 phpinfo() - instead of /tmp/mysql.sock.  This location appears to be
 contained in an environment variable called MYSQL_SOCKET, but I can't
 find where it is set.  One solution would be to get MySQL to put the
 mysql.sock file in the place expected by PHP.  Is this possible?
 
 At the moment, I have a /etc/my.cnf file with the following content:
 
 [mysqld]
 socket=/tmp/mysql.sock
 
 [client]
 socket=/tmp/mysql.sock
 
 I added these entries in an attempt to get PHP to use the actual
 location that MySQL is using, but this doesn't appear to have had any
 effect (according to phpinfo()).
 
 Secondly, MySQL appears to be trying to write logs to /var/log/mysql
 (according to MySQL Administrator).  This location does not exist.  I'm
 getting no error messages, but presumably this means I'm not getting any
 logs either.  Should I create this location and if so, what permissions
 and ownership should I give to the directory?
 
 Thanks in advance
 
 
 Peter
I just check my install of mysql (version mysql-4.1.13-3.8 on SUSE 10.0) and
the socket is in /var/lib/mysql and the mysqld log is in /var/lib/mysql.
This is the mysql version that came with my 10.0 DVD. Did you use YAST to
install? I don't know if these locations changed with the later version of
mysql.

From phpinfo:
MYSQL_SOCKET   /var/lib/mysql/mysql.sock
MYSQLI_SOCKET   /var/lib/mysql/mysql.sock

mysql.default_socket  no value  no value

Are your sockets enabled:
sockets
Sockets Support   enabled

Sorry I cannot help anymore.
-- 
Russ

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



Re: MySQL socket and logs locations

2006-09-24 Thread Peter Bradley

Russbucket wrote:

I just check my install of mysql (version mysql-4.1.13-3.8 on SUSE 10.0) and
the socket is in /var/lib/mysql and the mysqld log is in /var/lib/mysql.
This is the mysql version that came with my 10.0 DVD. Did you use YAST to
install? I don't know if these locations changed with the later version of
mysql.
  
Thanks a lot for that, Russ.  The difference between our two setups is 
that you've done the SuSE 10.0 YaST install of mysql 4.1.  I needed to 
upgrade from that to MySQL 5.0, because I wanted to use stored 
procedures.  The result is that I had to do a binary install from files 
supplied by MySQL on their site.  It was either that or upgrade to SuSE 
10.1.


However, I think I've sorted it by altering my /etc/my.cnf file.  Time 
will tell :)

Sorry I cannot help anymore.
  

Thanks for trying.  It's appreciated.


Peter



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



RE: soft link mysql socket?

2004-07-30 Thread u235sentinel

Hello, mysql Gurus,
	Because of disk space issues, the data dir of my mysql DB is somewhere 
else other than /var/lib/mysql. I did not link /var/lib/mysql to the real 
data dir though.  It works OK until I want to use perl DBI which complains 
can't connect to mysql thru '/var/lib/mysql/mysql.sock'. So I just create a 
soft link of '/var/lib/mysql/mysql.sock' pointing to the real socket and it 
works. I am wondering if this is gonna give me any problem in the future. 
Or i should just soft link the whole '/var/lib/mysql' instead of a single file?

THank you very much for help. All the best
ginger
I've been doing this off and on with various systems for various 
reasons.  Haven't had a problem so far.  Unix basically treats 
everything as a file so hard links, soft links, sockets.  It basically 
doesn't care so long as you have rights, you can do this without issue.


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


soft link mysql socket?

2004-07-29 Thread Ginger Cheng
Hello, mysql Gurus,
	Because of disk space issues, the data dir of my mysql DB is somewhere 
else other than /var/lib/mysql. I did not link /var/lib/mysql to the real 
data dir though.  It works OK until I want to use perl DBI which complains 
can't connect to mysql thru '/var/lib/mysql/mysql.sock'. So I just create a 
soft link of '/var/lib/mysql/mysql.sock' pointing to the real socket and it 
works. I am wondering if this is gonna give me any problem in the future. 
Or i should just soft link the whole '/var/lib/mysql' instead of a single file?

THank you very much for help. All the best
ginger

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


Re: soft link mysql socket?

2004-07-29 Thread Jeremy Zawodny
On Thu, Jul 29, 2004 at 08:10:42PM -0700, Ginger Cheng wrote:
 Hello, mysql Gurus,
   Because of disk space issues, the data dir of my mysql DB is somewhere 
 else other than /var/lib/mysql. I did not link /var/lib/mysql to the real 
 data dir though.  It works OK until I want to use perl DBI which complains 
 can't connect to mysql thru '/var/lib/mysql/mysql.sock'. So I just create a 
 soft link of '/var/lib/mysql/mysql.sock' pointing to the real socket and it 
 works. I am wondering if this is gonna give me any problem in the future. 

It shouldn't be a problem.
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

[book] High Performance MySQL -- http://highperformancemysql.com/

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



Re: Mysql Socket Error

2004-01-13 Thread Birju Shah
Hello,

Thankyou for your quick response.
When I start getting this error, the mysql crashes, any application which I
try to start which uses mysql backend, says mysql.sock error could not
connect .
-
DBI connect('database=search;host=localhost','web',...) failed: Can't
connect to local MySQL server through socket '/tmp/mysql.sock' (61) at (eval
2) line 1
--
When i try to restart the mysql server nothing happens and the only option
that remains is to reboot the entire system. Everything works fine then for
a few days and again the same error.

Birju Shah

-



















- Original Message -
From: Daniel Kasak [EMAIL PROTECTED]
To: Birju Shah [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 12, 2004 2:13 PM
Subject: Re: Mysql Socket Error


 Birju Shah wrote:

 Hello Friends,
 
 We are using free bsd, mysql 4.0.15. We are using this system since more
than a year now. We have a autoresponder script which has mysql database.
Since a month or so we are noticing that mysql gives the mysql.sock error
and the only option which remains is to reboot the entire system.
 
 This error didnt happen before, the same scripts are running, we havent
changed anything in the scripts. The mysql gives the socket error sometimes
in 3 days sometimes in 7-8 days.
 
 What can be causing this error and what is the solution.
 
 Sorry to bother you.
 
 Birju Shah
 
 
 Another mysql.sock error!
 Firstly, when you start getting the error, what's happening to MySQL? Do
 you access it in any other way, or only though the script which works
 via the socket? Can you connect to MySQL with the command-line client,
 or with MySQLCC?
 Maybe MySQL is crashing and this is the reason which you can't connect
 through the socket. What do the mysql logs say? Maybe examine / post them.

 --
 Daniel Kasak
 IT Developer
 NUS Consulting Group
 Level 5, 77 Pacific Highway
 North Sydney, NSW, Australia 2060
 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
 email: [EMAIL PROTECTED]
 website: http://www.nusconsulting.com.au






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



Re: Mysql Socket Error

2004-01-13 Thread walt
Birju,
What messages do you get in the mysql log file? The message you're
getting from perl just says that the database is not available. Before
you try to restart mysql, have you checked to see if there are still
mysql processes running (ps -eax |grep -i mysql). Have you run myisamchk
on the tables since mysql has crashed.

walt


Birju Shah wrote:
 
 Hello,
 
 Thankyou for your quick response.
 When I start getting this error, the mysql crashes, any application which I
 try to start which uses mysql backend, says mysql.sock error could not
 connect .
 -
 DBI connect('database=search;host=localhost','web',...) failed: Can't
 connect to local MySQL server through socket '/tmp/mysql.sock' (61) at (eval
 2) line 1
 --
 When i try to restart the mysql server nothing happens and the only option
 that remains is to reboot the entire system. Everything works fine then for
 a few days and again the same error.
 
 Birju Shah
 
 -
 
 - Original Message -
 From: Daniel Kasak [EMAIL PROTECTED]
 To: Birju Shah [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, January 12, 2004 2:13 PM
 Subject: Re: Mysql Socket Error
 
  Birju Shah wrote:
 
  Hello Friends,
  
  We are using free bsd, mysql 4.0.15. We are using this system since more
 than a year now. We have a autoresponder script which has mysql database.
 Since a month or so we are noticing that mysql gives the mysql.sock error
 and the only option which remains is to reboot the entire system.
  
  This error didnt happen before, the same scripts are running, we havent
 changed anything in the scripts. The mysql gives the socket error sometimes
 in 3 days sometimes in 7-8 days.
  
  What can be causing this error and what is the solution.
  
  Sorry to bother you.
  
  Birju Shah
  
  
  Another mysql.sock error!
  Firstly, when you start getting the error, what's happening to MySQL? Do
  you access it in any other way, or only though the script which works
  via the socket? Can you connect to MySQL with the command-line client,
  or with MySQLCC?
  Maybe MySQL is crashing and this is the reason which you can't connect
  through the socket. What do the mysql logs say? Maybe examine / post them.
 
  --
  Daniel Kasak
  IT Developer
  NUS Consulting Group
  Level 5, 77 Pacific Highway
  North Sydney, NSW, Australia 2060
  T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
  email: [EMAIL PROTECTED]
  website: http://www.nusconsulting.com.au
 
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

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



Re: Mysql Socket Error

2004-01-13 Thread walt
Birju,
Here's a little Linux/Unix info for you.

The /tmp/mysql.sock in question is used for ipc (Inter Process 
Communication). This allows other applications to communicate with the mysql 
server without using a TCP/IP connection. This eliminates the need to pass 
everything through the networking code.

In the post below, the person is having problems when trying to connect 
through the network layer. It would be like changing your database connect 
string to
DBI connect('database=search;host=192.168.1.5','web',...).

As far as the 1045 error, it does not look like you typed everything 
correctly. What is the -number supposed to be?

walt

On Wednesday 14 January 2004 05:03 am, you wrote:
 Hello Walt,

 I did and it says the following

  mysql -u websquash -number

 ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
 NO)

 One more thing, I just saw that there is someone who has posted a query
 where the mysql crashes on freebsd. I am pasting it below
 if that can be of help to you taking my situation in consideration.

 --Some one posted this 
 Hi!On Jan 12, Holm Tiffe wrote: Description: mysqld 4.0.17 crash on
 FreeBSD 5.1-current-alpha How-To-Repeat: Any acces over IP (not domain
 socket) crashes mysqld: #/usr/local/bin/mysqladmin: connect to server at
 'install' failed error: 'Lost connection to MySQL server during query' 
 syslog: install mysqld[78066]: warning: can't get client address: Bad file
 descriptorI suspect it is a an issue of KSE library (either a bug or
 someincompatibility with MySQL).Could you run mysqld with libc_r and see if
 it helps ?Unfortunately we don't have FreeBSD-5/Alphato try this ourselves.
 Regards,Sergei--__  ___ ___   __  /  |/  /_ __/ __/ __ \/ /
 Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__  MySQL AB,
 Senior Software Developer/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
 ___/  www.mysql.com-- MySQL General Mailing ListFor list archives:
 http://lists.mysql.com/mysqlTo unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
- ---




 - Original Message -
 From: walt [EMAIL PROTECTED]
 To: Birju Shah [EMAIL PROTECTED]
 Sent: Tuesday, January 13, 2004 12:17 PM
 Subject: Re: Mysql Socket Error

 On Wednesday 14 January 2004 04:41 am, you wrote:
  Hello,
 
  When I run the command it gave me this
 
Command history
 
   ls /tmp/mysql.sock
 
  /tmp/mysql.sock
 
 
 
 
  Now, how do I execute the client through the command prompt ?
 
  Let me know
 
  Thankyou
  birju shah

 try something like
 `mysql -u your_user_name -p`
 when it asks for your password, type it in.

 walt


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



Re: Mysql Socket Error

2004-01-13 Thread Daniel Kasak
Birju Shah wrote:

Hello,

Thankyou for your quick response.
When I start getting this error, the mysql crashes, any application which I
try to start which uses mysql backend, says mysql.sock error could not
connect .
-
DBI connect('database=search;host=localhost','web',...) failed: Can't
connect to local MySQL server through socket '/tmp/mysql.sock' (61) at (eval
2) line 1
--
When i try to restart the mysql server nothing happens and the only option
that remains is to reboot the entire system. Everything works fine then for
a few days and again the same error.
I am attaching the mysql log file. thanks for your help
Birju Shah
 

See below for comments on logs...

030724 09:46:23  mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
 

It wouldn't be a bad idea to do what MySQL is suggesting and either set 
the innodb data file path, or ad the skip-innodb option to your my.cnf

snipped

031030 11:41:08  mysqld started
Cannot initialize InnoDB as 'innodb_data_file_path' is not set.
If you do not want to use transactional InnoDB tables, add a line
skip-innodb
to the [mysqld] section of init parameters in your my.cnf
or my.ini. If you want to use InnoDB tables, add to the [mysqld]
section, for example,
innodb_data_file_path = ibdata1:10M:autoextend
But to get good performance you should adjust for your hardware
the InnoDB startup options listed in section 2 at
http://www.innodb.com/ibman.html
/usr/local/libexec/mysqld: ready for connections
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail
key_buffer_size=8388600
record_buffer=131072
sort_buffer=2097144
max_used_connections=40
max_connections=100
threads_connected=2
It is possible that mysqld could use up to 
key_buffer_size + (record_buffer + sort_buffer)*max_connections = 225791 K
bytes of memory
Hope that's ok, if not, decrease some variables in the equation

 

Right. Here is where I'd be getting worried. Once a db server crashes 
like this, I do a re-install and restore my data from a backup. I've 
found that if you continue after a crash like this, the chances of 
another crash are increased, and also there is no easy way of knowing if 
your data is corrupt or missing.
If you use the rpm installation method, sorry ... you're on your own. I 
compile MySQL and install into /usr/local/mysql, and if things go bad ( 
which hasn't happened for over a year for me now, and was hardware 
related in my case anyway ), I:

mv /usr/local/mysql /usr/local/mysql_CORRUPT
cd /usr/src/mysql-4.0.17
make install
scripts/mysql_install_db
and then restart the server, import my backups that I create with 
mysqldump, and run the transaction logs that were created after the last 
backup.

I don't remember MySQL-4.0.15 doing this on me ever, but that's not to 
say that it's not a bug. The latest version is 4.0.17 anyway, so I 
suggest that the first thing you do is do a full dump of your 
database(s), upgrade to 4.0.17, and import your data.

Next, I'd do some hardware checks. Get a memory testing app ( memtest86 
- I think - is available on freshmeat ). After testing with this, and 
maybe doing a big compile job ( some kde libs should do nicely ), if you 
are sure it isn't a hardware issue, make a bug report. Don't overlook 
hardware issues, especially on a built-it-myself box. My crashes went 
away completely when I dumped our old K6-2 500 for our new Athlon 2000XP 
box :)

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Mysql Socket Error

2004-01-12 Thread Birju Shah
Hello Friends,

We are using free bsd, mysql 4.0.15. We are using this system since more than a year 
now. We have a autoresponder script which has mysql database. Since a month or so we 
are noticing that mysql gives the mysql.sock error and the only option which remains 
is to reboot the entire system.

This error didnt happen before, the same scripts are running, we havent changed 
anything in the scripts. The mysql gives the socket error sometimes in 3 days 
sometimes in 7-8 days.

What can be causing this error and what is the solution.

Sorry to bother you.

Birju Shah



Re: Mysql Socket Error

2004-01-12 Thread Daniel Kasak
Birju Shah wrote:

Hello Friends,

We are using free bsd, mysql 4.0.15. We are using this system since more than a year now. We have a autoresponder script which has mysql database. Since a month or so we are noticing that mysql gives the mysql.sock error and the only option which remains is to reboot the entire system.

This error didnt happen before, the same scripts are running, we havent changed anything in the scripts. The mysql gives the socket error sometimes in 3 days sometimes in 7-8 days.

What can be causing this error and what is the solution.

Sorry to bother you.

Birju Shah
 

Another mysql.sock error!
Firstly, when you start getting the error, what's happening to MySQL? Do 
you access it in any other way, or only though the script which works 
via the socket? Can you connect to MySQL with the command-line client, 
or with MySQLCC?
Maybe MySQL is crashing and this is the reason which you can't connect 
through the socket. What do the mysql logs say? Maybe examine / post them.

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


mysql-socket

2003-07-19 Thread G Gill
how do you make a socket or use unix_socket etc. The basics?

--
G Gill mailto:[EMAIL PROTECTED]


RE: linux and mysql socket

2003-06-20 Thread TheMechE
Hmmm I was having that issue when I shut my server down... i.e. the
mysql daemon... did you turn off your machine, and not have mysql
automatically boot up?

-Original Message-
From: azamka [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 4:07 PM
To: [EMAIL PROTECTED]
Subject: linux and mysql socket


I installed mysql manually on red hat 9. It worked fine couple days but from
yesterday i am getting a weird error when i tried to run the mysql. the
error
statement is  Error 2002: Can't connect to local MySql server through
socket
'/tmp/mysql.sock'(2).

I am new user of Linux and I am unable to figure out why is this happening.
Please help me.

thanks in advance.
Kamran



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



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



Re: linux and mysql socket

2003-06-20 Thread John Nichel
azamka wrote:
I installed mysql manually on red hat 9. It worked fine couple days but from
yesterday i am getting a weird error when i tried to run the mysql. the
error
statement is  Error 2002: Can't connect to local MySql server through
socket
'/tmp/mysql.sock'(2).
I am new user of Linux and I am unable to figure out why is this happening.
Please help me.
thanks in advance.
Kamran
When you try to run the server you get this error, or when you try to 
connect to the server?  Is the MySQL server running?

ps -ax | grep mysqld

If it is running, does the socket actually exist in /tmp?

ls -al /tmp | grep mysql.sock

If it is there, what are the permissions?  If it isn't there, is it in 
/var/lib/mysql?

ls -al /var/lib/mysql | grep mysql.sock

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


linux and mysql socket

2003-06-19 Thread azamka
I installed mysql manually on red hat 9. It worked fine couple days but from 
yesterday i am getting a weird error when i tried to run the mysql. the error 
statement is  Error 2002: Can't connect to local MySql server through socket 
'/tmp/mysql.sock'(2).

I am new user of Linux and I am unable to figure out why is this happening. 
Please help me.

thanks in advance.
Kamran



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



RE: linux and mysql socket

2003-06-19 Thread Dathan Vance Pattishall
Your client is configured to connect via UNIX sock on localhost. It
thinks the sock is on /tmp when it's probably /var/lib/mysql

Take a look at /etc/my.cnf and make the change there or at the command
line.

---Original Message-
--From: azamka [mailto:[EMAIL PROTECTED]
--Sent: Thursday, June 19, 2003 1:07 PM
--To: [EMAIL PROTECTED]
--Subject: linux and mysql socket
--
--I installed mysql manually on red hat 9. It worked fine couple days
but
--from
--yesterday i am getting a weird error when i tried to run the mysql.
the
--error
--statement is  Error 2002: Can't connect to local MySql server
through
--socket
--'/tmp/mysql.sock'(2).
--
--I am new user of Linux and I am unable to figure out why is this
--happening.
--Please help me.
--
--thanks in advance.
--Kamran
--
--
--

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




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



RE: linux and mysql socket

2003-06-19 Thread Kenneth Hylton
If it truly ran fine for a few days and then you couldn't run the client,
you may have another problem.

If you rebooted the box, mysqld may not have automatically started.

So, all of the sudden, the client can't connect to the socket since it is
not there as the server is not running.

You can check the my.cnf file until your are blue in the face, but, if the
server isn't running, then the socket file isn't anywhere to be found, no
matter what is in my.cnf.

By the way, I did this one to myself too!

Ken Hylton



-Original Message-
From: Dathan Vance Pattishall [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 3:45 PM
To: 'azamka'; [EMAIL PROTECTED]
Subject: RE: linux and mysql socket


Your client is configured to connect via UNIX sock on localhost. It
thinks the sock is on /tmp when it's probably /var/lib/mysql

Take a look at /etc/my.cnf and make the change there or at the command
line.

---Original Message-
--From: azamka [mailto:[EMAIL PROTECTED]
--Sent: Thursday, June 19, 2003 1:07 PM
--To: [EMAIL PROTECTED]
--Subject: linux and mysql socket
--
--I installed mysql manually on red hat 9. It worked fine couple days
but
--from
--yesterday i am getting a weird error when i tried to run the mysql.
the
--error
--statement is  Error 2002: Can't connect to local MySql server
through
--socket
--'/tmp/mysql.sock'(2).
--
--I am new user of Linux and I am unable to figure out why is this
--happening.
--Please help me.
--
--thanks in advance.
--Kamran
--
--
--

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




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

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



Re: mysql socket problem in win98 (thanks for the help!)

2002-10-21 Thread Wakan
First of all, thanks to everyone for no reply and no help!

If someone is interested, I've found that i Win9x systems,
if there are persistent connections open, the system instead of
used the same opened connection for the same session,
it opens a new connection for each script call, and,
because it can't close persistent connections, (the port has
always estabilished connection), it ever opens new port connection
to the 3306 (Mysql server), while it reachs the open port limit.
So, it's impossible to make new connections with servers.
Ciao


__
Mio Yahoo!: personalizza Yahoo! come piace a te 
http://it.yahoo.com/mail_it/foot/?http://it.my.yahoo.com/

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Re: mysql socket problem in win98 (thanks for the help!)

2002-10-20 Thread Wakan
At 13.49 20/10/2002 +0200, you wrote:

Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:

sql,query

If you just reply to this message, and include the entire text of it in the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. Just typing the word MySQL once will be sufficient, for example.

You have written the following:

First of all, thanks to everyone for no reply and no help!

If someone is interested, I've found that i Win9x systems,
if there are persistent connections open, the system instead of
used the same opened connection for the same session,
it opens a new connection for each script call, and,
because it can't close persistent connections, (the port has
always estabilished connection), it ever opens new port connection
to the 3306, while it reachs the open port limit.
So, it's impossible to make new connections with servers.
Ciao


__
Scarica il nuovo Yahoo! Messenger: con webcam, nuove faccine e tante altre 
novità.
http://it.yahoo.com/mail_it/foot/?http://it.messenger.yahoo.com/


__
Scarica il nuovo Yahoo! Messenger: con webcam, nuove faccine e tante altre novità.
http://it.yahoo.com/mail_it/foot/?http://it.messenger.yahoo.com/

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




mysql socket problem in win98

2002-10-18 Thread Wakan
HI,
I'm on a win98 2ED system, running
- Apache 1.3.26 + php 4.2.3
- Mysql 3.23.52 (started server is mysqld)

I'm running some php scripts, that works with a database.
Every script, makes a db_connect.
It happens that, after a certain time (I don't know how much, and
I don't know if it really involved), and/or after a certain number (I don't 
know how much again!)
of operations,
win98 begins to open a new connection to the 3306 port (mysqld) for each db 
operation!.
After that, it's merely a question of time, and when the connections become 
so many,
it becomes impossible to connect to any port.
I'm asking for your help bacause I don't know what to do.
Thanks in advance.
Carlo


__
Mio Yahoo!: personalizza Yahoo! come piace a te 
http://it.yahoo.com/mail_it/foot/?http://it.my.yahoo.com/

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: The Mysql socket thing using Redhat 7.1

2001-09-05 Thread Ed Carp

jason bailey ([EMAIL PROTECTED]) writes:

 I'm consistently getting the error (2002)
 : Can't connect to local MySQL server through socket
 '/var/mysql/mysql.sock' (111)

You mean /var/lib/mysql/mysql.sock? Details are IMPORANT.

 I've deleted it and running something above has brought it back again!- this
 is good I think

Bad idea.

 1. Can i found out if the server is or is not running -which command and
 what am I looking for?

mysqladmin status

 2. Can I stop the mysql server

mysqladmin shutdown

 3. Can I start it?

safe_mysqld

Where is mysql.sock?  In /tmp?  If so:

ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

Should get you going.

--
Ed Carp, N7EKG  -  [EMAIL PROTECTED]  -  214/341-4420 - http://www.pobox.com/~erc

Squished Mosquito, Inc.
Internet Applications Development
Escapade Server-Side Scripting Language Development Team
http://www.squishedmosquito.com
Pensacola - Dallas - Dresden - London

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: The Mysql socket thing using Redhat 7.1

2001-09-05 Thread Jason Bailey

Ed,

Thanks for the email. I was a bit tired last night and was a little frustrated (4 
nights getting nowhere), so apologies if I was little rude (I've just reread my email) 
and
sarcastic, but thanks for the 'Details' pun. I've dug myself into a hole offering to 
set up a Linux/Apache Webserver for a friend. There's no rush but wanted to use it as a
learning experience and am getting problems with mysql- everything else seems ok.

jason bailey ([EMAIL PROTECTED]) writes:

 I'm consistently getting the error (2002)
 : Can't connect to local MySQL server through socket
 '/var/mysql/mysql.sock' (111)

You mean /var/lib/mysql/mysql.sock? Details are IMPORANT.

Yes, thanks for the pun. It was the above /var/lib/mysql/mysql.sock and I noted that 
deleting it and then running mysql_install_db  or possible safe_mysqld recreated.  

 I've deleted it and running something above has brought it back again!- this
 is good I think

Bad idea.

Slightly sarcastic- sorry

 1. Can i found out if the server is or is not running -which command and
 what am I looking for?

mysqladmin status

As I remember and I'm not sure I was going round in circles- this was a call giving 
the error- I've just read somewhere to  check that this is installed, so will do that
tonight

 2. Can I stop the mysql server

mysqladmin shutdown  

Again an error on that one

 3. Can I start it?

safe_mysqld

Yep it does produces a lot of information and then ends (I think- you see I'm not sure)

Where is mysql.sock?  In /tmp?  If so:
ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

mysql.sock  is in the directory that the error produces i.e.
/var/lib/mysql/mysql.sock

ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
Should get you going.

This, in my ignorance, looks like a soft link to the mysql.sock in the 
/var/lib/mysql/mysql.sock
location. The file(?) does exist and I'm not sure why a softlink will help unless it's 
something to do with permissions.
Thanks for your suggestions I'll give them a try.

Regards
Jason


Dr Jason Bailey
Desktop Applications Consultant
Computing Service
The University of Sussex


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: The Mysql socket thing using Redhat 7.1

2001-09-05 Thread Ed Carp

Jason Bailey ([EMAIL PROTECTED]) writes:

 You mean /var/lib/mysql/mysql.sock? Details are IMPORANT.
 
 Yes, thanks for the pun. It was the above /var/lib/mysql/mysql.sock and I noted 
that deleting it and then running mysql_install_db  or possible safe_mysqld 
recreated.  

Well, it wasn't a pun :)  Details are critically important, especially when you work 
with complex systems like these.  I was commenting on the lack of detail in your post 
- you ran something and something happened, but you weren't quite sure what. It's 
much more difficult when people have to guess what you did.  I'm not trying to flame 
you at all - but you will probably be able to get a lot more, and a lot higher 
quality, help if you can supply as much detail as possible.

  I've deleted it and running something above has brought it back again!- this
  is good I think
 
 Bad idea.
 
 Slightly sarcastic- sorry

No, this really *is* a bad idea! The mysql.sock file is created by the server - if you 
delete it, you will not be able to connect locally.

 ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
 Should get you going.
 
 This, in my ignorance, looks like a soft link to the mysql.sock in the 
/var/lib/mysql/mysql.sock
 location. The file(?) does exist and I'm not sure why a softlink will help unless 
it's something to do with permissions.

If the server is creating mysql.sock in /var/lib/mysql and something else is looking 
for it in /tmp, this is the easiest way to get it to work, besides checking to make 
sure that the permissions are such that anyone who needs to can read and write to 
mysql.sock.
--
Ed Carp, N7EKG  -  [EMAIL PROTECTED]  -  214/341-4420 - http://www.pobox.com/~erc

Squished Mosquito, Inc.
Internet Applications Development
Escapade Server-Side Scripting Language Development Team
http://www.squishedmosquito.com
Pensacola - Dallas - Dresden - London

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: The Mysql socket thing using Redhat 7.1

2001-09-05 Thread Jason Bailey

Ed,

Once again, thanks for the email response. I'm going to try all the suggestions I've 
received. 

A colleague has suggested as I'm new to Linux to select the 'Install Everything' 
option in red hat 7.1. He suggests that it's probably easier (for me) to get everything
installed and work backward (uninstall the unnecessary) as I learn more.   

If the server is creating mysql.sock in  and something else is looking for it in 
/tmp, this is the easiest way to get it to
work, besides checking to make sure
that the permissions are such that anyone who needs to can read and write to 
mysql.sock. --

I think this may be my problem in that I couldn't understand whether   mysql.sock 
should be located in /var/lib/mysql but is required to be in /tmp. It certainly 
appears in
/var/lib/mysql  
I'll try your suggestion for this and check permissions.



 Well, it wasn't a pun :)  Details are critically important, especially when you work 
with complex systems like these.  I was commenting on the lack of detail in your post 
-

My mistake about the Pun. I do agree details are important; I will use mysqlbug next 
time, if I get no joy. I'd found several, if not more, postings from several people 
with
the same type of question, regarding the error I was getting. I'd assumed that this 
common problem was well understood and didn't require explicit detail from myself. 

 you ran something and something happened, but you weren't quite sure what. It's 
much more difficult when people have to guess what you did.  I'm not trying to flame 
you
 at all - but you will probably be able to get a lot more, and a lot higher quality, 
help if you can supply as much detail as possible.

I would'nt blame you for flaming my first email was a little rude. The detail I will 
try for next time.
 
  I've deleted it and running something above has brought it back again!- this
  is good I think
 
  Bad idea.
 
 Slightly sarcastic- sorry
 
 No, this really *is* a bad idea! The mysql.sock file is created by the server - if 
you delete it, you will not be able to connect locally.

I'd been sarcastic and was apologising. I realised it was a bad idea but was getting 
frustrated and wanted to see if it would be recreated as a test if I was running the
server at all. On deleting it I was finding that it was being recreated when running 
something.

Something- I wasn't sure about at the time either mysql_install_db or safe_mysqld  - 
still not sure but will check tonight when I get home.




Dr Jason Bailey
Desktop Applications Consultant
Computing Service
The University of Sussex


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: The Mysql socket thing using Redhat 7.1

2001-09-05 Thread Trond Eivind Glomsrød

[EMAIL PROTECTED] (Jason Bailey) writes:

 If the server is creating mysql.sock in and something else is looking
 for it in /tmp, this is the easiest way to get it to work, besides
 checking to make sure that the permissions are such that anyone who
 needs to can read and write to mysql.sock. --
 
 I think this may be my problem in that I couldn't understand whether
 mysql.sock should be located in /var/lib/mysql but is required to be
 in /tmp. It certainly appears in /var/lib/mysql I'll try your
 suggestion for this and check permissions.

As written before, it is a permissions problem - mysql_install_db
(unnecesarry , don't run it - just run service mysqld start ) will
create files owned by root.

If you look in the default /etc/my.cnf, the database runs as user
mysql (for security reasons). 

To fix it, do a chown -R mysql.mysql /var/lib/mysql

If you had started mysql the same way you start other services (httpd,
samba, etc) via tksysv/ntsysv(permanently, on every boot) or service
httpd start (do it right now - equivalent to /etc/init.d/httpd
start), it would have created the database with correct permissions 
automatically. mysql_install_db and safe_mysqld aren't necesarry,
and will often cause problems.

-- 
Trond Eivind Glomsrød
Red Hat, Inc.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




The Mysql socket thing using Redhat 7.1

2001-09-04 Thread jason bailey

HI,

I'm a new user to Linux and am interested in MySQL and PHP. I currently use
both as a developer elsewhere and am now trying to set up a test server at
home.

I've searched the MYSQL lists and notice that alot of people are getting a
similar problem as myself and I'm not sure if any have got this to work.

I'm consistently getting the error (2002)
: Can't connect to local MySQL server through socket
'/var/mysql/mysql.sock' (111)

I've read through the manual about problems starting a server but this has
not helped and I've tried to follow help in the lists but again no result.

I run mysql_install_db and get the messages about starting up

I run safe_mysqld  and get something about starting and stopping

I've found the the mysql.sock and it's in the location that the error
mentions the location of the sock thing?? (It's late and I'm tired and a bit
fed up -after being told to forget windows and go to Linux- I really wanted
to agree but am now finding it hard too!)

I've deleted it and running something above has brought it back again!- this
is good I think

I've uninstalled mysql and reinstalled the client, server etc but still the
same error

People keep responding about starting up or restarting the server. Someone
has mentioned Services Mqsqld Start which does something but every single
time I try mysql I get that error.

I'm just going round in circles now. Can someone give me some help.

1. Can i found out if the server is or is not running -which command and
what am I looking for?
2. Can I stop the mysql server
3. Can I start it?

Using anything to do with mysql or mysqladmin results in the error. I'm
currently reading about something to do with configure  how ???

Please please please help

Jason


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: The Mysql socket thing using Redhat 7.1

2001-09-04 Thread Trond Eivind Glomsrød

jason bailey [EMAIL PROTECTED] writes:

 HI,
 
 I'm a new user to Linux and am interested in MySQL and PHP. I currently use
 both as a developer elsewhere and am now trying to set up a test server at
 home.
 
 I've searched the MYSQL lists and notice that alot of people are getting a
 similar problem as myself and I'm not sure if any have got this to work.
 
 I'm consistently getting the error (2002)
 : Can't connect to local MySQL server through socket
 '/var/mysql/mysql.sock' (111)
 
 I've read through the manual about problems starting a server but this has
 not helped and I've tried to follow help in the lists but again no result.
 
 I run mysql_install_db and get the messages about starting up
 
 I run safe_mysqld  and get something about starting and stopping
 
 I've found the the mysql.sock and it's in the location that the error
 mentions the location of the sock thing?? (It's late and I'm tired and a bit
 fed up -after being told to forget windows and go to Linux- I really wanted
 to agree but am now finding it hard too!)

You shouldn't have done mysql_install_db (which creates db files,
owned by root) and safe_mysqld (which will start the database as
user mysql, who can't read or write to the necesarry files).

Do a chown -R mysql.mysql /var/lib/mysql, then start the database
with service mysqld start. If you had done this (or just selected it
to start in one of the runlevel managers, like ntsysv or tksysv), it
would have initialized the database automatically.

To make mysqld start on every boot, do chkconfig mysqld start.

-- 
Trond Eivind Glomsrød
Red Hat, Inc.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Problem with MySQL socket file after re-install on RH 7.1

2001-07-22 Thread Rob Valliere

Hello:

I re-installed MySql RPM and now cannot access MySql. The details...

I have RedHat 7.1 installed and am running Apache 1.3.14, MySql 3.23.26 and
PHP 4.04, all from the RedHat 7.1 installation. They have been running for a
month in a stable environment with any problems. I have used all 3 apps
extensively. Other related utilities installed and working:

MySQLGUI 1.7.5

phpMyAdmin 2.2.0

webmin 0.87 (RH 7.1)

A few days ago and while trying to change the root password for MySql, I did
something wrong and could not access MySql. I reviewed the MySQL docs and
The bitbybit.dk MySQL FAQ regarding my problems.

So using RPM, I uninstalled the 4 MySql database apps (mysql, mysql-devel,
mysql-server and mysqlclient9). I removed the Mysql log file and the Mysql
database directory, then re-booted. I then installed the 4 packages using
RPM and re-booted. No problems reported. All defaults locations are used.

In the boot log, this is the error whenever I boot and mysqld is run...

==

010722 15:59:11 mysqld started

010722 15:59:13 /usr/libexec/mysqld: Can't find file: './mysql/host.frm'
(errno: 13)

010722 15:59:13 mysqld ended

And whenever I try to access Mysql, I get this error message...

==

ERROR 2002: Can't connect to local MySQL server through socket

'/var/lib/mysql/mysql.sock' (111)

The mysql.sock file appears only after mysqld is run. I have sysreports from

before and after.

I could fix this my doing a RedHat 7.1 Installation, but hopefully there
will be a quicker way, and it will be good for me to learn how to solve this
one.

Your help in solving this problem is greatly appreciated as I am dead in
the water without MySql.

Thanks very much. Regards,

Rob Valliere

[EMAIL PROTECTED]

PS - here is the mysqlbug report...

===

Release: mysql-3.23.36 (Source distribution)

Environment:

machine, os, target, libraries (multiple lines)

System: Linux solo 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown

Architecture: i686

Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake

Compilation info: CC='gcc' CFLAGS='-O2 -march=i386 -mcpu=i686' CXX='c++'

CXXFLAGS='-O2 -march=i386 -mcpu=i686' LDFLAGS=''

LIBC:

lrwxrwxrwx 1 root root 13 Jun 30 05:42 /lib/libc.so.6 - libc-2.2.2.so

-rwxr-xr-x 1 root root 1236396 Apr 7 04:58 /lib/libc-2.2.2.so

Configure command: ./configure
i386-redhat-linux --prefix=/usr --exec-prefix=/usr

--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share

--includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec

--localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man

--infodir=/usr/share/info --without-debug --without-readline --enable-shared

--with-extra-charsets=complex --with-bench --localstatedir=/var/lib/mysql

--with-unix-socket-path=/var/lib/mysql/mysql.sock --with-mysqld-user=mysql

--with-extra-charsets=all --with-berkeley-db




MySQL socket

2001-03-23 Thread Diego Romoli

Hi, I've just installed Apache, MySQL and PHP on RedHat 7.0 and I can't connect to 
MySQL through PHP. I get an error saying that it can't connect to MySQL using socket 
/var/lib/mysql/mysql.sock. When I connect to the MySQL server through the mysql client 
program, I can see that that is the socket it uses to connect.

What happens here?

Thanks in advance,

Diego