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]


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]