Page 2 of 2

Re: mythtv cannot connect to database

Posted: Tue Jul 09, 2019 3:52 pm
by samweis
So this is what I did:
Entered "bind-address = [local network address]" into /etc/mysql/mariadb.conf.d/60-mythtv.cnf.
Put the hostname instead of "localhost" into all mythtv config.xml.
Tried mysql -u mythtv -p mythconverg -h [hostname] and got a "connection denied", because now I am no longer connecting as mythtv@localhost but as mythtv@hostname.mynetwork.
Created the user mythtv@hostname.mynetwork in mariadb and gave it the same privileges and same password as mythtv@localhost had.
Now I can connect with mysql.
After a restart the mythtv-backend service comes up flawlessly, and the frontend works, too.

Thank you!

P.S.: I am going to file a bug report with mariadb.
They can't really call this a feature...

Re: [Solved] mythtv cannot connect to database

Posted: Wed Jul 10, 2019 3:31 am
by bill6502

I've got MariaDB loaded on a test host and would like to duplicate the issue.

I know that when I set the bind-address=:: in /etc/mysql/mariadb.conf.d/60-mythtv.cnf
and <Host>localhost</Host> in config.xml, the backend works.

Then on my remote frontend: <Host>mc1-6</Host> is set, and that's the IPv6 hostname
of my test backend. That FE works too.

You really want localhost in your backend's config.xml so a socket is used rather than
TCP. If MythTV sees, it converts the DB host to localhost too.

(I connect from the remote FE via IPv6 just for testing.)

Can you confirm your original (failing) setup please? I'm guessing that /etc/mysql/mariadb.conf.d/60-mythtv.cnf
didn't exist. And from your post above, <Host>localhost</Host> in had been set in all config.xml files. I'll also
guess that the default bind-address is 127.0.0 (grep -r bind-address /etc/mysql .)

Danke sehr