[mythtv-users] Can't connect to remote backend database (again)

R. G. Newbury newbury at mandamus.org
Fri Aug 6 20:49:50 UTC 2021


On 2021-08-06 3:52 a.m., Phill Edwards wrote:
>      > Back in June I posted a problem where I couldn't connect any remote
> 
>      > This is my list of users:
>      > mysql> select host,user from mysql.user;
>      > +-------------+------------------+
>      > | host        | user             |
>      > +-------------+------------------+
>      > | %           | mythtv           |
>      > | 192.168.0.% | mythtv           |
>      > | localhost   | debian-sys-maint |
>      > | localhost   | mysql.infoschema |
>      > | localhost   | mysql.session    |
>      > | localhost   | mysql.sys        |
>      > | localhost   | root             |
>      > +-------------+------------------+
> 
>     Run that mysql query again, but use:
> 
>     select host, user, password from mysql.user;
> 
>     So you can check if the (hash of the) passwords are the same. I have
>     never seemed to have had any luck with using the '%' wildcard for
>     connections. So I specify each one by IP:
> 
>     MariaDB [(none)]> select host,user,password from mysql.user where
>     user =
>     "mythtv";
>     +-------------------+--------+-------------------------------------------+
>     | host              | user   | password                             
>          |
>     +-------------------+--------+-------------------------------------------+
>     | localhost         | mythtv |
>     *CC8F35F587CA5A556B4132C2407E556D92172FFC
>     | 192.168.1.99      | mythtv | *CC8F35F587CA5A556B4132C2407E556D92172FFC
>     | 192.168.1.96      | mythtv |
>     *CC8F35F587CA5A556B4132C2407E556D92172FFC
>     | 192.168.1.95      | mythtv |
>     *CC8F35F587CA5A556B4132C2407E556D92172FFC
>     | 192.168.1.86      | mythtv | *CC8F35F587CA5A556B4132C2407E556D92172FFC
> 
>     Those are the main desktop, the mythbox and the laptop (wired and
>     wireless) as set in /etc/hosts and on each computer.
>     Works for me.
> 
> 
> 
> Hi, thanks for this tip. I've literally been trying to get this working 
> on and off for weeks, but no success. As a last resort I dropped the 
> user and re-created it and used a brand new password, but it still won't 
> connect.
> 
> If it was a normal linux frontend I could SSH in and test connectivity 
> etc. But as this is a Chromecast With Google TV device I can't do that - 
> can I? Any ideas how to troubleshoot this? The problem could be network 
> connectivity (probably not as the Leanfront app works), or database 
> grants or incorrect password? Any suggestions on how I can troubleshoot 
> this?
> 
> Also, I noticed the Chromecast With Google TV device has an IPv6 address 
> as well as IPv4. Could that be causing a problem?
> 
> 
> 
> BTW the column names are different on MySQL vs MariaDB, so the MySQL 
> query should be
> mysql> select host, user, authentication_string from mysql.user;

Leaving aside the possible Chromecast issues, it sounds more like a 
configuration problem on the *server*.

The server machine MUST HAVE:
bind-address= 0.0.0.0
and
#skip-networking in thr my.cnf config.(That is, the skip-networking line 
must be commented OUT.)
If bind-address is set to 127.0.0.1 then mysql/mariadb will NOT listen 
to anything external. Similarly with skip-networking which when active 
does exactly that.

Since this is a Chromecast device which (surprising to me) seems not to 
allow ssh, then I can only suggest that you beg, borrow, steal a laptop
and try ssh into the server from it. So long as your bbs laptop is on 
the same network sub-net (192.168.1...etc.) you should be able to launch 
a mysql client on it (presuming mysql is installed of course!).

And try the login commands which you grants have set up on the server. 
If the laptop is set to a different IP address you will at least get an 
error message, proving that there is communication between the mysql 
client and the mysql server.

G.






More information about the mythtv-users mailing list