473,327 Members | 2,025 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,327 software developers and data experts.

Why using TCP/IP instead of Unix Sockets?

An associate has asked me to take a look a problem he's having with starting
mysql. I thought I'd give it a shot to learn some more about mySQL before
having him turn it over to someone more knowledgeable than I. But I have to
ask here first.

Attempting to connect to the database via mysqladmin or mysql results in the
error (paraphrased) "Cannot connect to local database using socket
"/var/lib/mysql/mysql.sock".

That is the path to the socked specifiet in both mysqld and client sections
of the my.cnf.

mysqladmin -h `hostname` version shows that the Connection is via TCP/IP
rather than Unix Sockets.

Running on Redhat Linux AE 3 (I think)

/var/lib/mysql is world-writable-readable, but it is not owned by user mysql
(my next attempt to fix this)

/var/lib/mysql/mysql.sock is 777.

My question: What would be causing mysqld to be using TCP rather than Unix
sockets? I've checked permissions, verified settings in my.cnf (which is
very sparse... other entries are for logging), confirmed mysqld is running
and accessible via TCP/IP.

I'm fishing for clues. Any help appreciated.

- Virgil
Jul 20 '05 #1
5 2486

"Virgil Green" <vj*@obsydian.com> wrote in message
news:4l**************@newssvr23.news.prodigy.com.. .
An associate has asked me to take a look a problem he's having with starting mysql. I thought I'd give it a shot to learn some more about mySQL before
having him turn it over to someone more knowledgeable than I. But I have to ask here first. [snip ] /var/lib/mysql is world-writable-readable, but it is not owned by user mysql (my next attempt to fix this)


Is it possible this directory is not world-executable so that the mysql
account can't get in the directory?

Does the following work?

$ su -
$ su mysql
$ ls -l /var/lib/mysql/

Perhaps the domain sockets hasn't started?

$ netstat -na
.......
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 80825 /tmp/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 3483 /dev/gpmctl

Regards,

Mike Chirico
Jul 20 '05 #2

"Virgil Green" <vj*@obsydian.com> wrote in message
news:4l**************@newssvr23.news.prodigy.com.. .
An associate has asked me to take a look a problem he's having with starting mysql. I thought I'd give it a shot to learn some more about mySQL before
having him turn it over to someone more knowledgeable than I. But I have to ask here first. [snip ] /var/lib/mysql is world-writable-readable, but it is not owned by user mysql (my next attempt to fix this)


Is it possible this directory is not world-executable so that the mysql
account can't get in the directory?

Does the following work?

$ su -
$ su mysql
$ ls -l /var/lib/mysql/

Perhaps the domain sockets hasn't started?

$ netstat -na
.......
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 80825 /tmp/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 3483 /dev/gpmctl

Regards,

Mike Chirico
Jul 20 '05 #3

"Virgil Green" <vj*@obsydian.com> wrote in message
news:4l**************@newssvr23.news.prodigy.com.. .
An associate has asked me to take a look a problem he's having with starting mysql. I thought I'd give it a shot to learn some more about mySQL before
having him turn it over to someone more knowledgeable than I. But I have to ask here first. [snip ] /var/lib/mysql is world-writable-readable, but it is not owned by user mysql (my next attempt to fix this)


Is it possible this directory is not world-executable so that the mysql
account can't get in the directory?

Does the following work?

$ su -
$ su mysql
$ ls -l /var/lib/mysql/

Perhaps the domain sockets hasn't started?

$ netstat -na
.......
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 80825 /tmp/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 3483 /dev/gpmctl

Regards,

Mike Chirico
Jul 20 '05 #4
"Mike Chirico" <mc******@comcast.net> wrote in message
news:vp********************@comcast.com...

"Virgil Green" <vj*@obsydian.com> wrote in message
news:4l**************@newssvr23.news.prodigy.com.. .
An associate has asked me to take a look a problem he's having with starting
mysql. I thought I'd give it a shot to learn some more about mySQL before having him turn it over to someone more knowledgeable than I. But I have

to
ask here first.

[snip ]
/var/lib/mysql is world-writable-readable, but it is not owned by user

mysql
(my next attempt to fix this)


Is it possible this directory is not world-executable so that the mysql
account can't get in the directory?

Does the following work?

$ su -
$ su mysql
$ ls -l /var/lib/mysql/


Yes, this worked. As it happens, I had reported the mysql directory with the
wrong permissions earlier it was actually owned by mysql and world-readable
and executable.
Perhaps the domain sockets hasn't started?

$ netstat -na
......
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 80825 /tmp/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 3483 /dev/gpmctl


This command showed the socket started with the expected path.

*However*...

When I went to test these things this evening, I also discovered that mysqld
was running with sockets rather than TCP/IP and I noted that it had been up
for only just over an hour and a half though I hadn't touched the system in
over 15 hours. So, I'm checking to see if my associate made other changes or
merely restarted the system.

Thanks for your time, Mike, and your suggestions.

- Virgil
Jul 20 '05 #5
"Mike Chirico" <mc******@comcast.net> wrote in message
news:vp********************@comcast.com...

"Virgil Green" <vj*@obsydian.com> wrote in message
news:4l**************@newssvr23.news.prodigy.com.. .
An associate has asked me to take a look a problem he's having with starting
mysql. I thought I'd give it a shot to learn some more about mySQL before having him turn it over to someone more knowledgeable than I. But I have

to
ask here first.

[snip ]
/var/lib/mysql is world-writable-readable, but it is not owned by user

mysql
(my next attempt to fix this)


Is it possible this directory is not world-executable so that the mysql
account can't get in the directory?

Does the following work?

$ su -
$ su mysql
$ ls -l /var/lib/mysql/


Yes, this worked. As it happens, I had reported the mysql directory with the
wrong permissions earlier it was actually owned by mysql and world-readable
and executable.
Perhaps the domain sockets hasn't started?

$ netstat -na
......
udp 0 0 127.0.0.1:123 0.0.0.0:*
udp 0 0 0.0.0.0:123 0.0.0.0:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 80825 /tmp/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 3483 /dev/gpmctl


This command showed the socket started with the expected path.

*However*...

When I went to test these things this evening, I also discovered that mysqld
was running with sockets rather than TCP/IP and I noted that it had been up
for only just over an hour and a half though I hadn't touched the system in
over 15 hours. So, I'm checking to see if my associate made other changes or
merely restarted the system.

Thanks for your time, Mike, and your suggestions.

- Virgil
Jul 20 '05 #6

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

Similar topics

7
by: Torsten Schmidt | last post by:
Hi, I'm trying to connect to a mysql-Server using PHP's mysql-function mysql_connect. The host on which the mysql-server is running is not the same as the host apache and php are running on. The...
5
by: Fossie | last post by:
Hi folks, I am unable to solve the following problem, which should not be new, but I cannot find an appropriate solution anywhere: One python process ("daemon") waits for messages. Another...
4
by: Alex Martinoff | last post by:
Using the org.postgresql.Driver JDBC driver is it possible to connect to Postgres using a unix domain socket instead of a TCP socket (so you don't have to start the postmaster with -i)? Using a TCP...
3
by: jt | last post by:
Here is my code: unsigned long listenip; short tlen; sprintf(tmp,"len:%x listenip:%x",htonl(tlen),listenip); If the value on "tlen" is less than 2 bytes and the value on "listenip" is...
15
by: Alpha | last post by:
I was told that Unix API can only be called using C++, ATL and MFC. However, I was also told that C# can do that through Pinvoke to a DLL that interfaces with the Unix API. Can someone direct me...
9
by: Mike Curry | last post by:
I am looking for a simple sample of using sockets to download a page into a string. If anyone knows where I could get a sample, or post one here, that would be great.
4
by: Berk Birand | last post by:
Hi, I've been battling to get this for a long while now, but failed miserably after 6 hours. I'm trying to establish a client/server connection using low-level UNIX socket system calls. I am...
2
by: a_agaga | last post by:
Do you know are there some reasons why many do not make processes to communicate through memory? Why network connections (sockets) are used so commonly in IPC (inter process communication)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.