[Solved] mythtv cannot connect to database

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

samweis
Newcomer
Posts: 8
Joined: Mon Jul 08, 2019 3:50 pm
Germany

Re: mythtv cannot connect to database

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

Re: [Solved] mythtv cannot connect to database

Post by bill6502 »

Sam,

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 127.0.0.1, 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
Post Reply