473,890 Members | 1,173 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how do I get the socket and then avoid the 'Can't connect to localMySQL server through socket '...

Hi,
Trying to connect to the MySQL server I get the classic error message

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

I have tested and know that demon is running and then checket and found
the /var/lib/mysql/mysql.sock file missing.

But how do I get a new socket?
Thanks,

Chris
Oct 11 '06 #1
6 9706
hg
Christian wrote:
Hi,
Trying to connect to the MySQL server I get the classic error message

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

I have tested and know that demon is running and then checket and found
the /var/lib/mysql/mysql.sock file missing.

But how do I get a new socket?
Thanks,

Chris
Is the server running ?
Oct 11 '06 #2
Christian wrote:
I have tested and know that demon is running and then checket and found
the /var/lib/mysql/mysql.sock file missing.

But how do I get a new socket?
The socket file is created when the MySQL Server starts. But the MySQL
Server may have a different idea of where that socket file is supposed
to be created. Check your MySQL config file (my.ini or my.cnf) for the
"socket" option.

See also
http://dev.mysql.com/doc/refman/5.0/...ysql-sock.html for
information on specifying the socket file location.

Regards,
Bill K.
Oct 11 '06 #3
hg wrote:
Christian wrote:
>Hi,
Trying to connect to the MySQL server I get the classic error message

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

I have tested and know that demon is running and then checket and found
the /var/lib/mysql/mysql.sock file missing.

But how do I get a new socket?
Thanks,

Chris
Is the server running ?
Yes, because

workstation:/home/cmj # ps xa | grep mysqld
17811 pts/4 S+ 0:00 grep mysqld
Oct 12 '06 #4
hi christian,

the output of your ps -
workstation:/home/cmj # ps xa | grep mysqld
17811 pts/4 S+ 0:00 grep mysqld
simply means the grep happened to find itself in the ps output.

try running this instead:

ps xa | grep mysqld | grep -v grep

the -v option says to ignore the string that follows. if nothing comes
back you don't have any mysqld running and you'll have to restart it.

hope this helps,
brian

Christian wrote:
hg wrote:
Christian wrote:
Hi,
Trying to connect to the MySQL server I get the classic error message

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

I have tested and know that demon is running and then checket and found
the /var/lib/mysql/mysql.sock file missing.

But how do I get a new socket?
Thanks,

Chris
Is the server running ?

Yes, because

workstation:/home/cmj # ps xa | grep mysqld
17811 pts/4 S+ 0:00 grep mysqld
Oct 13 '06 #5
hg
Christian wrote:
hg wrote:
>Christian wrote:
>>Hi,
Trying to connect to the MySQL server I get the classic error message

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

I have tested and know that demon is running and then checket and found
the /var/lib/mysql/mysql.sock file missing.

But how do I get a new socket?
Thanks,

Chris
Is the server running ?

Yes, because

workstation:/home/cmj # ps xa | grep mysqld
17811 pts/4 S+ 0:00 grep mysqld
Brian is quite correct (I had not looked at your output carefully) - it
looks like your server is not running.

hg
Oct 13 '06 #6
Brian Mac wrote:
hi christian,

the output of your ps -
>workstation:/home/cmj # ps xa | grep mysqld
17811 pts/4 S+ 0:00 grep mysqld

simply means the grep happened to find itself in the ps output.

try running this instead:

ps xa | grep mysqld | grep -v grep

the -v option says to ignore the string that follows. if nothing comes
back you don't have any mysqld running and you'll have to restart it.

hope this helps,
brian
Thanks brian, you were quite right, and now its working.
Oct 14 '06 #7

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

Similar topics

4
2281
by: faktujaa | last post by:
Hi, I am having some problem with callback used in socket implementation. private static void Connect(string strPrtrIPAddr, int intPrtrPort, ref Socket rsocClient) { try { // Create remote end point. System.Net.IPAddress IPAddress = System.Net.IPAddress.Parse(strPrtrIPAddr); System.Net.IPEndPoint IPEndPoint = new System.Net.IPEndPoint(IPAddress,
9
3647
by: User | last post by:
Hi, I tried to find the information over the internet but didn't find any answers. I'm looking for a server side code example of winsock accepting many clients. I know that in VB.NET it is not implemented like in VB6. What I've done is one client per socket. Meaning that each client used a different port on the server, but I find it annoying.
3
9131
by: Daniel | last post by:
TcpClient close() method socket leak when i use TcpClient to open a connection, send data and close the TcpClient with myTcpClientInstance.Close(); it takes 60 seconds for the actual socket on the client machine to close per my network app the computer fills up w/ thousands of these :0 TCP foobox:8888 localhost:2188 TIME_WAIT :0 TCP foobox:8888 localhost:2189 TIME_WAIT :0 TCP foobox:8888 localhost:2190 TIME_WAIT
1
121553
by: jiing | last post by:
Now let me describe what I have done and my purpose: Originally, I want to user ports to install phpBB But I found that phpBB doesn't support mysql 5.x (but the ports installed mySQL 5.0.0 alpha) so I deinstall mysql5-server and mysql5-client And then I install mysql41-server and mysql41-client on FreeBSD 5.3 by ports but now , mysql is not workable
3
2214
by: Juan | last post by:
Where can I find information on how to secure a socket server? I'd like to implement the necessary measures to avoid hackers attacks and to authenticate the clients... thanks, Juan.
5
3696
by: John Sheppard | last post by:
Hi all, I am not sure that I am posting this in the right group but here it goes anyway. I am new to socket programming and I have been searching on the internet to the questions I am about to pose but have been unsuccessful in finding the answers so far. Either because my understanding of sockets isn't where it needs to be or my questions are too basic. My programming environment is Windows XP, Visual Studio .NET 2003 and C#. So here it...
14
25299
by: DaTurk | last post by:
I am makeing a Multicast server client setup and was wondering what the difference is between Socket.Connect, and Socket.Bind. It may be a stupid question, but I was just curious. Because I tried a test, and I can't bind two sockets to the same port/ip but I can connect with one socket, and bind with another to the same ip/port. Thanks
10
4055
by: Uma - Chellasoft | last post by:
Hai, I am new to VB.Net programming, directly doing socket programming. In C, I will be able to map the message arrived in a socket directly to a structure. Is this possible in VB.Net. Can anyone please help me with some sample codings and guidance? Can you also suggest some other news group available for socket programming in VB.Net?
2
3689
by: manasap | last post by:
Hi all! I've written a server and a client application using asynchronous sockets.The client sends data packets for every 7 seconds.The server receives the packets. This process proceeds smoothly without any errors but,sometimes I get the following error. "An existing connection was forcibly closed by the remote host." Why is this happening when i am not closing the client program? Could someone guide me in this issue
0
9821
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10815
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9630
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8016
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7169
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5850
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6042
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4676
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3276
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.