473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Why "service mysqld restart"??

This is my 5th or 6th server (both Unix and Windows varieties). In the
past I've gotten the message "ERROR 2002: Can't connect to local MySQL
server through socket '/var/lib/mysql/mysql.sock' (222)". In the past,
I've either asked someone else to start the server or just tried
everything I could until the server started.

This time, I took a systematic approach, and noted every step. What
finally worked was typing the command "service mysqld restart" It
didn't stop the server, of course, because the server wasn't running,
but it DID start the server.

Does anyone have an explanation of why this worked? Quite frankly, I
have no idea myself, but I sure would like to find out.

TIA - CCC.
Jul 19 '05 #1
4 5999

"ccc31807" <cc******@hotmail.com> wrote in message
news:22**************************@posting.google.c om...
This is my 5th or 6th server (both Unix and Windows varieties). In the
past I've gotten the message "ERROR 2002: Can't connect to local MySQL
server through socket '/var/lib/mysql/mysql.sock' (222)". In the past,
I've either asked someone else to start the server or just tried
everything I could until the server started.

This time, I took a systematic approach, and noted every step. What
finally worked was typing the command "service mysqld restart" It
didn't stop the server, of course, because the server wasn't running,
but it DID start the server.

Does anyone have an explanation of why this worked? Quite frankly, I
have no idea myself, but I sure would like to find out.

TIA - CCC.


I'm not 100% sure as I'm still picking up MySQL (six months working on it on
an almost daily basis)... however, I would bet that there is a 'pid' file
(something similar that Apache can create) that flags the database as
already running meaning a request to start will be denied, but a request to
restart removes the flag and re-creates it... Specifically, it may not be a
'pid' flag file, but more likely something inside the
/var/lib/mysql/mysq.sock file.

How was the database previously stopped? If it weren't cleanly shut down
this might be the root of the cause...
Jul 19 '05 #2

"ccc31807" <cc******@hotmail.com> wrote in message
news:22**************************@posting.google.c om...
This is my 5th or 6th server (both Unix and Windows varieties). In the
past I've gotten the message "ERROR 2002: Can't connect to local MySQL
server through socket '/var/lib/mysql/mysql.sock' (222)". In the past,
I've either asked someone else to start the server or just tried
everything I could until the server started.

This time, I took a systematic approach, and noted every step. What
finally worked was typing the command "service mysqld restart" It
didn't stop the server, of course, because the server wasn't running,
but it DID start the server.

Does anyone have an explanation of why this worked? Quite frankly, I
have no idea myself, but I sure would like to find out.

TIA - CCC.


I'm not 100% sure as I'm still picking up MySQL (six months working on it on
an almost daily basis)... however, I would bet that there is a 'pid' file
(something similar that Apache can create) that flags the database as
already running meaning a request to start will be denied, but a request to
restart removes the flag and re-creates it... Specifically, it may not be a
'pid' flag file, but more likely something inside the
/var/lib/mysql/mysq.sock file.

How was the database previously stopped? If it weren't cleanly shut down
this might be the root of the cause...
Jul 19 '05 #3
This was a clean install of the OS. I've found that, once mysqld gets
started, it works fine, but the trick it getting it running to begin
with.

CC

"Randell D." <yo**************************@yahoo.com> wrote in message news:<Arlcb.14866$TM4.9026@pd7tw2no>...
How was the database previously stopped? If it weren't cleanly shut down
this might be the root of the cause...

Jul 19 '05 #4
This was a clean install of the OS. I've found that, once mysqld gets
started, it works fine, but the trick it getting it running to begin
with.

CC

"Randell D." <yo**************************@yahoo.com> wrote in message news:<Arlcb.14866$TM4.9026@pd7tw2no>...
How was the database previously stopped? If it weren't cleanly shut down
this might be the root of the cause...

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ccc31807 | last post by:
This is my 5th or 6th server (both Unix and Windows varieties). In the past I've gotten the message "ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'...
14
by: RDI | last post by:
I'm in the process of wiritng a custom AutoResponder that will run on a spare PC. If I don't write it as an actual "Service" but just a program that starts via the startup folder, will that use...
22
by: Brett | last post by:
I have a second thread, t2, that errors out and will stop. It's status is then "Stopped". I try to start t2 from thread 1, t1, by checking If t2.threadstate = "Stopped" Then t2.start() ...
0
by: Diffident | last post by:
Hello All, I am trying to do a "build" of all files of my web app on my local machine. I know that there is an "aspnet_wp.exe" running forever on my machine and to my knowledge each web app is...
2
by: Chris Song | last post by:
Hello, I'v installed mysql 5.0 (MySQL-server-standard-5.0.27-0.rhel4.i386.rpm) on RedHat AS4. When I start mysql through command line (i.e. /usr/bin/mysqld_safe --datadir=/var/lib/mysql...
11
by: jjw92 | last post by:
I've been banging my head against the wall with this one for a couple days so I'm hoping someone has some ideas. I have a web service that I created that is called by a .NET class library (which in...
1
by: Brian Simmons | last post by:
Hi All, I know that if you modify the web.config file or any file in the App_Code subfolder, that ASP.net 2.0 will "restart" the application (i.e. clear out any sessions, etc...). Are there...
0
by: Si | last post by:
Hi, I'm working on a small project - a website with some access to DBs, etc. On my dev PC, all works fine. But on the hosting machine, after a short while, I get "Service Unavailable" and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.