[Solved] SQL Database Socket Connection

For discussion of topics specific to MythTV on linux
Post Reply
martyg
Newcomer
Posts: 13
Joined: Fri Mar 13, 2015 2:13 pm
United States of America

[Solved] SQL Database Socket Connection

Post 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.
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: SQL Database Socket Connection

Post 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.
martyg
Newcomer
Posts: 13
Joined: Fri Mar 13, 2015 2:13 pm
United States of America

Re: SQL Database Socket Connection

Post 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 :-)
Post Reply