Mailing List Archive

remote frontend connection problems
I've just installed a brand new backend server. When I run mythfrontend on
the backend server, it connects and everything is great. However, when I
try to connect a remote frontend to the backend, it doesn't work. I've
searched all over and still havent found the answer to this. My mysql
database has the right permissions. I set them, then I looked them up and
it said that mythtv had the rights on 192.168.0.%, which is correct. I have
commented out the skip-networking part of the my.cnf file, or whichever file
it was, I can't remember right now. Here is the error I get when I try to
run the remote mythfrontend.


2005-08-28 11:46:10.918 Unable to connect to database!
2005-08-28 11:46:10.918 Driver error was [1/2003]:
QMYSQL3: Unable to connect
Database error was:
Can't connect to MySQL server on '192.168.0.6' (111)

2005-08-28 11:46:10.918 Failed to init MythContext, exiting.
Re: remote frontend connection problems [ In reply to ]
Brian Wallen wrote:
> I've just installed a brand new backend server. When I run mythfrontend
> on the backend server, it connects and everything is great. However,
> when I try to connect a remote frontend to the backend, it doesn't
> work. I've searched all over and still havent found the answer to
> this. My mysql database has the right permissions. I set them, then I
> looked them up and it said that mythtv had the rights on 192.168.0.%,
> which is correct. I have commented out the skip-networking part of the
> my.cnf file, or whichever file it was, I can't remember right now. Here
> is the error I get when I try to run the remote mythfrontend.
>
>
> 2005-08-28 11:46:10.918 Unable to connect to database!
> 2005-08-28 11:46:10.918 Driver error was [1/2003]:
> QMYSQL3: Unable to connect
> Database error was:
> Can't connect to MySQL server on '192.168.0.6' (111)
>
> 2005-08-28 11:46:10.918 Failed to init MythContext, exiting.

This says that it wasn't able to open a TCP/IP socket so the
user access may be correct but still unknown.

Recent MySQL versions (better info for debugging is at www.mysql.org
rather than www.mythtv.org) use a different config approach for
netowrking with the "bind-address". To allow connections to any address:

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 0.0.0.0

Before trying mythfrontend again, makes sure you can connect with
the mysql client from the frontend machine with the parameters in
your mysql.txt file:

mysql -u mythtv -pmythtv -hyourmasterhost mythconverg

-- bjm
Re: remote frontend connection problems [ In reply to ]
On 8/28/05, Brian Wallen <brian_wallen@hotmail.com> wrote:
> I've just installed a brand new backend server. When I run mythfrontend on
> the backend server, it connects and everything is great. However, when I
> try to connect a remote frontend to the backend, it doesn't work.

Not sure if that'll hep, but it solved forntend connection troubles
for me: What IP did you set up in mythtv-setup on the backend?

It needs to be the system's network IP - in your case that'd be 192.168.0.6

If it's 127.0.0.1 (the defaut value), remote frontends won't be able to connect.

(You need to change it in 2 places on that form - once for the
system's IP, once for the master backend's IP (assuming that this is
your master backend, of course).


Jens
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: remote frontend connection problems [ In reply to ]
On Mon, 2005-08-29 at 14:24 +0200, Jens Baumeister wrote:
> On 8/28/05, Brian Wallen <brian_wallen@hotmail.com> wrote:
> > I've just installed a brand new backend server. When I run mythfrontend on
> > the backend server, it connects and everything is great. However, when I
> > try to connect a remote frontend to the backend, it doesn't work.

Edit:

/etc/mysql/my.cnf

on the backend server and comment out the line:

bind-address = 127.0.0.1

HTH
John
Re: Remote frontend connection problems [ In reply to ]
On Sun, 2020-10-18 at 21:38 -0400, Mary Strimel wrote:
> hi, I have freshly installed mythtv system on my Linux Mint PC.
> I installed the available packages from my distro, myth version 31. 
>
> The local frontend works fine. However, the frontend that I installed
> on my Android TV -- also version 31 -- is unable to connect. At first
> it saw the database and was unable to connect to it. After trying
> some of the fixes I read about online, now it doesn't see the
> database at all. 
>
> Here are the things I've tried:
> 1. went to mythbackend-setup and set the IP address to my real
> address instead of 127.0.0.1
> 2. verified that the PIN for remote logon is set to 0000
> 3. verified that the mysql password on the Android is the same as the
> one found in /home/mythtv/.mythtv/config.xml
> 4. Attempted to tell sql to allow the remote connection.
>   A. At first I used the command 
> "grant all on mythconverg.* to 'mythtv'@'%' identified by
> 'mypassword';"
>
> then I got an error because apparently that command is now
> deprecated. 
>
> B. So I tried GRANT ALL ON mythconverg.* TO mythtv@localhost
> IDENTIFIED BY "mythtv" PASSWORD "mypassword" which did not report an
> error, but also didn't give any feedback. In fact it made the mysql
> prompt look funny, so I'm assuming it was unhelpful?
>
> 5. I then went to /etc/mysql/my.cnf. According to the docs I should
> be commenting out a particular line regarding networking. However, my
> file didn't have those lines. It did not have sections either, like
> other peoples' seem to have. It just had two lines that start with
> "!includedir". I didn't change anything there.
>
> 6. As a last resort I went to /etc/mysql/conf.d/mythtv.cnf and
> changed the first line to "bind-address=192.168.1.253" [my IP].  I
> think this last step might have been wrong.
>
> What else do I need to do to connect my frontend? Should I undo
> things I tried above?
> Thank you!
> Mary
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://email.mg.glenb.net/c/eJxNjksKwyAYhE8TdxWN74WLbHoPX38iqCnRFnr7pqXQwmzmmxmYaAO4KDjKNmoHLoHgioEIYIyWUSmtPFBIyQjPBJgoCQ6upjJxspbUPG5poM0aJgh13DMClHsFQQsJMwWqA6dGzqjYbYzbxJZpvp4quY-O63Ns44H3Yz1RdblU175hbrC_4adxufd0dHTYf3s--O1fD2RA2Q
> http://email.mg.glenb.net/c/eJxFjbsOgkAQRb-G7dwszj6g2MLGSr-B7GMGNgIqDBr_XhILk1udnJObfaKQjRbF5yZQQDLaAZlEbdvY7FzjItWE2JoIhtpslUxhwrHSqh9xjnJGFoM3pG0Dqc4Qgo5ANild2wjWgFYKQIx-YH5UcKqO533vcity-vDAL3lf-p1cQxnL3HeXsnKHXJ4bMqNY_M86bCsu6_76j74v0jy3
> MythTV Forums: http://email.mg.glenb.net/c/eJxFjMsKwyAQAL8m3ipG3bgePPTS_9DsblLIoxhT6N830ENhLsPAUBolE3j1TIRZMgv44ARGiREHCgFDkV6YIxQHEmkweswrL50308Jb0Rs3NSdGjoyWojEswZkCxg3WIWC01HtWS5pbex2du3f2cSF7PVe9ftrc3nqvk6rpJ7fz4Hpc-3_7AjG_NC8

make sure the port is open, no firewall blocking it, or if firewall
open the port.
on the mysql privleges try : GRANT ALL ON mythconverg.* TO
mythtv@192.168.1.%  
try adding the bind address to my.cnf, and for me it always by making
it 0.0.0.0
Re: Remote frontend connection problems [ In reply to ]
On Sun, 2020-10-18 at 22:21 -0400, glen wrote:
> On Sun, 2020-10-18 at 21:38 -0400, Mary Strimel wrote:
> > hi, I have freshly installed mythtv system on my Linux Mint PC.
> > I installed the available packages from my distro, myth version
> > 31. 
> >
> > The local frontend works fine. However, the frontend that I
> > installed on my Android TV -- also version 31 -- is unable to
> > connect. At first it saw the database and was unable to connect to
> > it. After trying some of the fixes I read about online, now it
> > doesn't see the database at all. 
> >
> > Here are the things I've tried:
> > 1. went to mythbackend-setup and set the IP address to my real
> > address instead of 127.0.0.1
> > 2. verified that the PIN for remote logon is set to 0000
> > 3. verified that the mysql password on the Android is the same as
> > the one found in /home/mythtv/.mythtv/config.xml
> > 4. Attempted to tell sql to allow the remote connection.
> >   A. At first I used the command 
> > "grant all on mythconverg.* to 'mythtv'@'%' identified by
> > 'mypassword';"
> >
> > then I got an error because apparently that command is now
> > deprecated. 
> >
> > B. So I tried GRANT ALL ON mythconverg.* TO mythtv@localhost
> > IDENTIFIED BY "mythtv" PASSWORD "mypassword" which did not report
> > an error, but also didn't give any feedback. In fact it made the
> > mysql prompt look funny, so I'm assuming it was unhelpful?
> >
> > 5. I then went to /etc/mysql/my.cnf. According to the docs I should
> > be commenting out a particular line regarding networking. However,
> > my file didn't have those lines. It did not have sections
> > either, like other peoples' seem to have. It just had two lines
> > that start with "!includedir". I didn't change anything there.
> >
> > 6. As a last resort I went to /etc/mysql/conf.d/mythtv.cnf and
> > changed the first line to "bind-address=192.168.1.253" [my IP].  I
> > think this last step might have been wrong.
> >
> > What else do I need to do to connect my frontend? Should I undo
> > things I tried above?
> > Thank you!
> > Mary
> >
> > _______________________________________________
> > mythtv-users mailing list
> > mythtv-users@mythtv.org
> > http://email.mg.glenb.net/c/eJxNjkEOwiAURE9TdhJaoPAXLNx4jw98WhKopqCJt7caE01mM29mkokuJIxasew0Cp28mpMGafxoY5DGApClYFDZSUUYiTDygJXKoMRSaPN8o85WZ72ZhLIY1Kg8mAjg5QyACERGCsmKW3u_DfI8TJdDJbfeeH32tT_4dV8OVDGXits3zFu6vuGncbo32hvb3b89Hvz2L9GTQKs
> > http://email.mg.glenb.net/c/eJxFjcsOwiAURL-m7CRQoMCChRtX-g2Gx6Ul0qrtrca_l8SFk1mdzMkkF7NPSpLilGcqBzlkZYUO3KQotLEWDETtpellshzAJxr9DLWTbKywBLoAkslJoVoE7yPjmoU4KC1TD4NhLCjIiVQ3IT46cez6U-u73AqdPzjhi97XsZGLL7Us4_VcNrwClucOiEBW91sd9g3Wrb3-pS_LPjxM
> > MythTV Forums: http://email.mg.glenb.net/c/eJxFjMsKwyAQAL8m3irGR9w9eOil_6HrmhTyKGoK_fsGeijMZRiYHKjE7Kx4BheVK8lOxaHxaYRMxgMiA5OPFrTNODLHLCluvA5WzSvvSe7cxRKQ2FmNmhJblY3yGiZHkwYCjdF5sYal91cbzH3Qj4ty1HOT26cv_S2POosafnI7G9d27f_tC-Q-M7o
>
> make sure the port is open, no firewall blocking it, or if firewall
> open the port.
> on the mysql privleges try : GRANT ALL ON mythconverg.* TO
> mythtv@192.168.1.%  
> try adding the bind address to my.cnf, and for me it always by making
> it 0.0.0.0
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://email.mg.glenb.net/c/eJxNjkEOwiAURE9TdhJaoPAXLNx4jw98WhKopqCJt7caE01mM29mkokuJIxasew0Cp28mpMGafxoY5DGApClYFDZSUUYiTDygJXKoMRSaPN8o85WZ72ZhLIY1Kg8mAjg5QyACERGCsmKW3u_DfI8TJdDJbfeeH32tT_4dV8OVDGXits3zFu6vuGncbo32hvb3b89Hvz2L9GTQKs
> http://email.mg.glenb.net/c/eJxFjcsOwiAURL-m7CRQoMCChRtX-g2Gx6Ul0qrtrca_l8SFk1mdzMkkF7NPSpLilGcqBzlkZYUO3KQotLEWDETtpellshzAJxr9DLWTbKywBLoAkslJoVoE7yPjmoU4KC1TD4NhLCjIiVQ3IT46cez6U-u73AqdPzjhi97XsZGLL7Us4_VcNrwClucOiEBW91sd9g3Wrb3-pS_LPjxM
> MythTV Forums: http://email.mg.glenb.net/c/eJxFjMsKwyAQAL8m3irGR9w9eOil_6HrmhTyKGoK_fsGeijMZRiYHKjE7Kx4BheVK8lOxaHxaYRMxgMiA5OPFrTNODLHLCluvA5WzSvvSe7cxRKQ2FmNmhJblY3yGiZHkwYCjdF5sYal91cbzH3Qj4ty1HOT26cv_S2POosafnI7G9d27f_tC-Q-M7o

also check under /etc/mysql/conf.d to see if there is a server.cnf
there. i use mariadb and that is how it is on my system (arch linux),
so if that file is there, that would be the place to set your bind-
address=  statement
Re: Remote frontend connection problems [ In reply to ]
On 10/18/20 8:38 PM, Mary Strimel wrote:
> hi, 
> I have freshly installed mythtv system on my Linux Mint PC. I installed the available packages from my distro, myth version 31. 
>
> The local frontend works fine. However, the frontend that I installed on my Android TV -- also version 31 -- is unable to connect. At first it
> saw the database and was unable to connect to it. After trying some of the fixes I read about online, now it doesn't see the database at all. 
>
> Here are the things I've tried:
> 1. went to mythbackend-setup and set the IP address to my real address instead of 127.0.0.1
> 2. verified that the PIN for remote logon is set to 0000
> 3. verified that the mysql password on the Android is the same as the one found in /home/mythtv/.mythtv/config.xml
> 4. Attempted to tell sql to allow the remote connection.
>   A. At first I used the command 
> "grant all on mythconverg.* to 'mythtv'@'%' identified by 'mypassword';"
>
> then I got an error because apparently that command is now deprecated. 
>
> B. So I tried GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv" PASSWORD "mypassword" which did not report an error, but
> also didn't give any feedback. In fact it made the mysql prompt look funny, so I'm assuming it was unhelpful?

If you're running mysql (as opposed to mariadb), and it's version 8.x
see: https://code.mythtv.org/cgit/mythtv/tree/mythtv/database/mc.sql
for the proper SQL. These commands won't work on mariadb below 10.3.

> 5. I then went to /etc/mysql/my.cnf. According to the docs I should be commenting out a particular line regarding networking. However, my file
> didn't have those lines. It did not have sections either, like other peoples' seem to have. It just had two lines that start with "!includedir".
> I didn't change anything there.

Making changes to files under the 2nd includedir's path is good. It will be used after
the 1st. Just be sure the file is alpha numerically last (so any changes won't be
undone by changes in some other file.)

If changes are made to /etc/mysql/conf.d/mythtv.cnf (and the like), then
restart mysql then try the command above.

> 6. As a last resort I went to /etc/mysql/conf.d/mythtv.cnf and changed the first line to "bind-address=192.168.1.253" [my IP].  I think this
> last step might have been wrong.

Probably OK.

> What else do I need to do to connect my frontend? Should I undo things I tried above?
> Thank you!
> Mary

If this doesn't work, then mythtv won't (I don't know if it's available
on the Android but you could try it from the backend host):

mysql --user=mythtv --password=<from config.xml> --host=<hostname or IP of backend> mythconverg

^^^ assumes that the backend also has the SQL server running - which is likely.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Remote frontend connection problems [ In reply to ]
Thank you.


> *make sure the port is open, no firewall blocking it, or if firewall open
> the port.*
> *on the mysql privleges try : GRANT ALL ON mythconverg.*
> TO mythtv@192.168.1.% <mythtv@localhost> **try adding the bind address
> to my.cnf, and for me it always by making it 0.0.0.0*


It was not the firewall, but I tried your next suggestion about the GRANT
ALL command, restarted mysql with "sudo service mysql restart" and now it
works.
I'm not familiar with mariadb as i last used myth about 10 years ago. But
given that restarting mysql helped, I guess that must be what my system is
using.

Thank you Glenb and everyone for your help!


On Sun, Oct 18, 2020 at 10:23 PM glen <glenb@glenb.net> wrote:

> On Sun, 2020-10-18 at 21:38 -0400, Mary Strimel wrote:
>
> hi,
> I have freshly installed mythtv system on my Linux Mint PC. I installed
> the available packages from my distro, myth version 31.
>
> The local frontend works fine. However, the frontend that I installed on
> my Android TV -- also version 31 -- is unable to connect. At first it saw
> the database and was unable to connect to it. After trying some of the
> fixes I read about online, now it doesn't see the database at all.
>
> Here are the things I've tried:
> 1. went to mythbackend-setup and set the IP address to my real address
> instead of 127.0.0.1
> 2. verified that the PIN for remote logon is set to 0000
> 3. verified that the mysql password on the Android is the same as the one
> found in /home/mythtv/.mythtv/config.xml
> 4. Attempted to tell sql to allow the remote connection.
> A. At first I used the command
> "grant all on mythconverg.* to 'mythtv'@'%' identified by 'mypassword';"
>
> then I got an error because apparently that command is now deprecated.
>
> B. So I tried GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED
> BY "mythtv" PASSWORD "mypassword" which did not report an error, but also
> didn't give any feedback. In fact it made the mysql prompt look funny, so
> I'm assuming it was unhelpful?
>
> 5. I then went to /etc/mysql/my.cnf. According to the docs I should be
> commenting out a particular line regarding networking. However, my file
> didn't have those lines. It did not have sections either, like other
> peoples' seem to have. It just had two lines that start with "!includedir".
> I didn't change anything there.
>
> 6. As a last resort I went to /etc/mysql/conf.d/mythtv.cnf and changed the
> first line to "bind-address=192.168.1.253" [my IP]. I think this last step
> might have been wrong.
>
> What else do I need to do to connect my frontend? Should I undo things I
> tried above?
> Thank you!
> Mary
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> <http://email.mg.glenb.net/c/eJxNjksKwyAYhE8TdxWN74WLbHoPX38iqCnRFnr7pqXQwmzmmxmYaAO4KDjKNmoHLoHgioEIYIyWUSmtPFBIyQjPBJgoCQ6upjJxspbUPG5poM0aJgh13DMClHsFQQsJMwWqA6dGzqjYbYzbxJZpvp4quY-O63Ns44H3Yz1RdblU175hbrC_4adxufd0dHTYf3s--O1fD2RA2Q>
> http://wiki.mythtv.org/Mailing_List_etiquette
> <http://email.mg.glenb.net/c/eJxFjbsOgkAQRb-G7dwszj6g2MLGSr-B7GMGNgIqDBr_XhILk1udnJObfaKQjRbF5yZQQDLaAZlEbdvY7FzjItWE2JoIhtpslUxhwrHSqh9xjnJGFoM3pG0Dqc4Qgo5ANild2wjWgFYKQIx-YH5UcKqO533vcity-vDAL3lf-p1cQxnL3HeXsnKHXJ4bMqNY_M86bCsu6_76j74v0jy3>
> MythTV Forums: https://forum.mythtv.org
> <http://email.mg.glenb.net/c/eJxFjMsKwyAQAL8m3ipG3bgePPTS_9DsblLIoxhT6N830ENhLsPAUBolE3j1TIRZMgv44ARGiREHCgFDkV6YIxQHEmkweswrL50308Jb0Rs3NSdGjoyWojEswZkCxg3WIWC01HtWS5pbex2du3f2cSF7PVe9ftrc3nqvk6rpJ7fz4Hpc-3_7AjG_NC8>
>
>
> make sure the port is open, no firewall blocking it, or if firewall open
> the port.
> on the mysql privleges try : GRANT ALL ON mythconverg.* TO
> mythtv@192.168.1.% <mythtv@localhost>
> try adding the bind address to my.cnf, and for me it always by making it
> 0.0.0.0
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Re: Remote frontend connection problems [ In reply to ]
On Mon, 19 Oct 2020 08:28:40 -0400, you wrote:

>It was not the firewall, but I tried your next suggestion about the GRANT
>ALL command, restarted mysql with "sudo service mysql restart" and now it
>works.
>I'm not familiar with mariadb as i last used myth about 10 years ago. But
>given that restarting mysql helped, I guess that must be what my system is
>using.
>
>Thank you Glenb and everyone for your help!

MariaDB installs itself in a way that makes it look as though it is
MySQL. So the command that restarts MySQL also works for MariaDB as
it sets up an alias to make that command work. To see if you are
running MariaDB instead of MySQL, just type this command:

mysql --version

If you are running MariaDB, you should see something like this:

mysql Ver 15.1 Distrib 10.3.22-MariaDB, for debian-linux-gnu (x86_64)
using readline 5.2

If it is real MySQL, there will be no mention of "MariaDB" in the
output.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org