Page 1 of 1

[Solved] SQL Database Socket Connection

Posted: Wed Sep 12, 2018 12:51 am
by martyg
My backend installation has the mythbackend and mysqld (Mariadb) on the same host.

Mariadb provides a direct socket interface into the SQL server, short-circuiting the entire TCP/IP stack.

Is there any way to configure the backend to speak to mysqld using this socket?
I couldn't find anything in the documentation regarding this.

Re: SQL Database Socket Connection

Posted: Wed Sep 12, 2018 2:00 am
by bill6502
Use localhost or 127.0.0.1 in config.xml.

At least one reference is: https://www.mythtv.org/wiki/Configuring ... tion_1.2F2

See: https://code.mythtv.org/cgit/mythtv/tre ... n.cpp#n159

I haven't tested this is years.

Re: SQL Database Socket Connection

Posted: Wed Sep 12, 2018 7:34 pm
by martyg
OK, I can confirm this magic works as intended.
I figured someone would need to tell the client where the socket was configured, but the system appears to figure this out on its own.

A quick "tcpdump -i lo port 3306" can be used to monitor the interface for traffic.
Changing the database host to "localhost" makes all this activity go away.

I had to tweak both the backend and mythweb to clean this up completely.
@bill6502 Thanks for the response, I think my system is noticeably faster as a result :-)