ERROR 2002 (HY000): Can"t connect to local MySQL server through

ERROR 2002 (HY000): Can"t connect to local MySQL server through

am 27.10.2009 07:29:39 von sac.faizal

--0016e64c34c0b16c610476e4cef6
Content-Type: text/plain; charset=ISO-8859-1

hi experts

ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/tmp/mysql.sock' (2)

iam facing the above error while connecting the mysql database. i am also
checked the mysql.sock socket file is not in /tmp.

could you please help me to fix this problem. what i have to do now..

is there any way to replace the socket file from another mysql server or i
have to reinstall mysql software in this server. if re-installation from the
scratch mean what are the steps i have follow before and after installation
to safeguard the existing databases..

please provide you assistance to fix this issue..

many thanks in advance..


Best Regards
Faizal S
GSM : 9840118673
Blog: http://oradbapro.blogspot.com

--0016e64c34c0b16c610476e4cef6--

Re: ERROR 2002 (HY000): Can"t connect to local MySQL server through

am 27.10.2009 11:17:45 von sac.faizal

--0016364181d56fa3920476e7fe32
Content-Type: text/plain; charset=ISO-8859-1

Hi

thanks for your reply.

i found the problem, the problem was due to maintenance activity IT team
rebooted the machine but they didn't start the mysql server after reboot.

i executed mysqld with root credit. i got the below output but still the
cursor not return to prompt

bash-2.03# /usr/local/mysql/libexec/mysqld -u root
091027 15:35:09 InnoDB: Started; log sequence number 0 625687
091027 15:35:10 [Note] /usr/local/mysql/libexec/mysqld: ready for
connections.
Version: '5.0.51-log' socket: '/tmp/mysql.sock' port: 3306 Source
distribution

can you verify this. is it correct.

thanks in advance..




Best Regards
Faizal S
GSM : 9840118673
Blog: http://oradbapro.blogspot.com


On Tue, Oct 27, 2009 at 12:03 PM, wrote:

> The socket hets created when you start the server
> It might be in the mysql home dir, it might be in /var/run.
> See if its declared in my.cnf
>
>
> Sent via BlackBerry from T-Mobile
>

--0016364181d56fa3920476e7fe32--

How can I know if Mysql Crashed or stopped gracefully

am 27.10.2009 15:51:58 von bcantwell

I have an environment where upon boot of a machine I need to know if
mysql shutdown nicely or if it crashed.
How can I know for sure which was the case so that I can take action if
needed?
I notice that issuing a reboot or shutdown -r now command, (in Linux)
that the 'service mysql stop' is never run... it just seems to catch
the sig 15 and does its own shutdown...

I have scripted in the stop section of my init script to touch a file
that I look for on restart, but if the stop is never executed on
reboot/shutdown, then I have a problem.

Thanks for the help,
Bryancan

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: How can I know if Mysql Crashed or stopped gracefully

am 27.10.2009 18:35:46 von Johan De Meersman

--0016e6d99f20b83dc50476ee1b21
Content-Type: text/plain; charset=ISO-8859-1

Signal 15 is pretty much equal to a regular shutdown, except that if your
shutdown script doesn't run, you may be left with lockfiles, pidfiles and
the like.

A crash would most likely be visible in the logfile, and even if it isn't
(machine loses power), your log should show innodb running a recovery
procedure at startup.


On Tue, Oct 27, 2009 at 3:51 PM, Bryan Cantwell wrote:

> I have an environment where upon boot of a machine I need to know if mysql
> shutdown nicely or if it crashed.
> How can I know for sure which was the case so that I can take action if
> needed?
> I notice that issuing a reboot or shutdown -r now command, (in Linux) that
> the 'service mysql stop' is never run... it just seems to catch the sig 15
> and does its own shutdown...
>
> I have scripted in the stop section of my init script to touch a file that
> I look for on restart, but if the stop is never executed on reboot/shutdown,
> then I have a problem.
>
> Thanks for the help,
> Bryancan
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=vegivamp@tuxera.be
>
>

--0016e6d99f20b83dc50476ee1b21--

Re: How can I know if Mysql Crashed or stopped gracefully

am 27.10.2009 20:17:09 von Todd Lyons

On Tue, Oct 27, 2009 at 7:51 AM, Bryan Cantwell w=
rote:
> I notice that issuing a reboot or shutdown -r now command, (in Linux) tha=
t
> the 'service mysql stop' =A0is never run... it just seems to catch the si=
g 15
> and does its own shutdown...
> I have scripted in the stop section of my init script to touch a file tha=
t I
> look for on restart, but if the stop is never executed on reboot/shutdown=
,
> then I have a problem.

What distro? Which version of mysql? My comments below apply to our
InnoDB heavy CentOS systems.

Older versions of mysql (5.0.x on our CentOS machines) wait 60 seconds
for the mysqld process to completely die. If mysql has a lot of data
to flush to disk, it can take longer than that 60 seconds. The init
script assumes that the kill command didn't succeed, it prints out
FAILED, and the system shutdown process moves on to the next init
script. Near the end of the system shutdown process, the shutdown
script issues a final SIGKILL to remaining running processes. If
mysqld didn't finish flushing that data before this final KILL signal,
the mysqld process is killed instantly and you have an unclean
shutdown.

One quick solution is to manually stop mysql, watching to see when the
process finally goes away (top, ps, etc), then do your shutdown -r
now.

Modern versions of mysql (5.1.x) seem to handle this better because it
waits as long as it takes for mysqld to shut down properly or to start
up (and accept connections). At least in my testing so far, I've not
hit a timeout or received an incorrect OK or FAILED message in the
5.1.x series.

--=20
Regards... Todd
The best thing about pair programming is that you have the perfect
audience for your genius. -- Kent Beck

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg