I'm not sure what you mean. Are you asking about how to determine this when you're doing sockets programming or how to determine if a port is actually responding such as port 25 for incoming mail?
Trying to determine if Mysql is connecting to the default port (3306). I get errors that it cannot connect, but I want be sure the socket is opening and closing correctly/
If you want to test if the socket is listening, just telnet to the server's IP address on port 3306. If telnet connects, then the socket is "working". That doesn't mean everything is configured correctly though, just that there is a program connected to that port via a socket and it is binding correctly. If you know the syntax for any of the communication, you could then type these to see if it responds with an appropriate response. For example, if you're testing a webserver, connect to port 80 and then type "get / http1.0" and hit return twice. You should see a stream of characters corresponding to the default webpage. If you do this to pop or smtp servers, they actually send out a greeting message first which makes it very clear that the server is functioning. Web servers (and I suspect MYSql) don't send out this welcome message so all you see is that it connected. In this case, you will have to know some of the communication syntax to see if the server is really working.
Thanks GJ. I've followed your instructions and my connection is lost immediately when I try to telnet to myserver 3306. Does this indicate that there's something wrong? Of course I'm not able to telnet into other ports either except for the natural telnet port.
I would think that indicates something is wrong. I would check to see if you have something like tcpwrappers interferring with your connection (assuming you're on linux). It's also possible that the application is disconnecting due to an internal error or misconfiguration. Also, I believe MySQl has the ability to limit connections to specific IPs. I would check to make sure this isn't the case as that would explain the dropped connection.
Thanks Again. I will see what I can find about tcpwrappers. The problem really stems from my linux box crashing because a cron ran off and opened about 300 mysqls. Don't know why it did. It's been working fine for a long time. Now all of a sudden I get an error message like: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
This is not an uncommon error for Mysql users -- typically happens right after install, but like I said, mine was running fine and I have to think that the problem wasn't mysql, but rather this port not working correctly.
If it's been running fine and then gets this error frequently after the crash, I would suspect corruption somewhere. If there are any utilities for checking the system databases, I would run them and then re-install as a last resort. If you have any backups of static files such as the shared libraries, I would restore those as a last resort before a re-installation.
If infact any libraries were corrupted, would it be indicated in the date of the file? Meaning would the file should up as being changed? Or is corruption possible without the date changing?
That's a good question and I really don't know the answer. I suspect that you could have situations that would cause it to happen both ways. I would think that you're more likely to have an updated time stamp than not but it's just a guess.
Now that I think about it, I got a few of these errors prior to the crash. I understand it's a memory problem that is because the memory is not allocated to the program?
Or is it a hardware issue? Or was I hacked (I find no evidence of this).
I believe segmentation faults are related to or sometimes related to memory allocation problems. It's possible that if the file is corrupt and the diagnostic tool doesn't properly check for errors, it could generate a segmentation fault. I would suspect corruption in this case over hacking as a hacker would usually target other areas and not specific data files.
I would try to find out what that file and any other corrupted files do and see if you can repair/rebuild/restore them.
That looks normal to me based on what I see on my boxes but I'm not an expert in that area. I have been told that linux like to use up most of the memory and then make it available to programs that request it so I think it's normal for your memory utilization to be that high.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.