[mythtv-users] 0.19 - local frontend working great , remote frontend not (localhost:6543)
R. G. Newbury
newbury at mandamus.org
Wed Jul 19 21:34:00 UTC 2006
Mark Knecht wrote:
> Phil,
> Thanks. I am sure you are on the right track. However you have
> uncovered a problem here with MySQL permissions that I'm not
> understanding. I hope you can help.
Sounds like you have two concurrent problems going on, both related to
name resolution and authentication. You need to fix both!
You have 3 machines: 1 backend and 2 frontends.
Edit file /etc/hosts on all three machines and make sure that you have
your boxen properly identified. Since I own a proper domain, I have used
a full domain name, but you could just as easily have 'mythbox at my-house'
You need something like:
127.0.0.1 localhost.mandamus.org localhost #Required or things
break!
192.168.1.98 any1.mandamus.org any1
192.168.1.97 any2.mandamus.org any2
192.168.1.96 mythbox.mandamus.org mythbox
192.168.1.95 thinkpad.mandamus.org thinkpad
192.168.1.94 any3.mandamus.org any3
192.168.1.11 netprinter.mandamus.org netprinter
192.168.1.1 linksys.mandamus.org linksys router
Now your machines can resolve each other by name to IP address. Note
that the last two lines allows me to type http://linksys into firefox
and get the admin page of my router. Similarly for the netprinter.
The second problem involves the naming of mysql boxes and the people
allowed to access mysql on the various boxes. This is your other problem.
There are some good pointers deep in the mythtv documentation, as well
as on the wiki. Even better, there is a good explanation of the manner
in which mysql authenticates users in the mysql manual (available as pdf
from mysql)... About Chapter 23... dealing with 'Why can't I sign on?
Access refused' or somesuch.
To look at your setup, log on to mysql at the backend, as the mysql root
user. This gives access to the mysql database which 'mythtv' cannot access.
Then 'use mysql' and 'select host, user, password from user;'
This gives the host and user information kept in the user table. You
will see something like my (very) insecure data:
mysql> select host, user, password from user;
+-------------------+----------+------------------+
| host | user | password |
+-------------------+----------+------------------+
| localhost | root | |
| tor2.mandamus.org | root | |
| %.mandamus.org | mythtv | 0476fc026afffe24 |
| %.mandamus.org | geoffrey | 330040e53766a829 |
| localhost | mythtv | 0476fc026afffe24 |
| localhost | geoffrey | 330040e53766a829 |
+-------------------+----------+------------------+
6 rows in set (0.00 sec)
This is my office desktop machine setup.
Firstly, I should have a password on 'root'. Secondly, I should probably
drop the user 'geoffrey' at localhost access as it is a subset of the
geoffrey@%.mandamus.org' access.
I use this machine as a clone or surrogate for the actual mythbox at
home. Both are BE/FE setups, but this machine has no tuner cards. The
database *thinks* it has tuner cards as the database was originally
copied from the mythbox at a point prior to the first run of
mythfilldatabase. I keep the versions the same. Both have a user
'mythtv' which accesses 'localhost' for the backend That way I can run
mythfilldatabase here and then transfer the progam guide table
information there without problems. (Tables: credits oldprogram people
program programgenres and programrating ONLY).
The line with '%.mandamus.org' is what you want. It will allow user
mythtv database access from any machine (%) in the domain. If you try
access from a frontend machine from the mysql command line, you must
specify the host 'mysql -h backend -u mythtv -pmythtv'
I had problems transferring data if I used the %.mandamus.org setup, as
the mysqldump program tags its output with the host which produced it,
so that you cannot (directly at least) restore onto another host.
A table written on any1.mandamus.org is considered NOT to be the same
table as one on any2.mandamus.org and restoring from file does not work.
Of course, localhost == localhost. ( I suppose I could edit the
mysqldump output instead!)
I used the instruction: "grant all on mythconverg to
'mythtv'@'%.my-house' identified by 'mythtv';"
Try that, and your frontend machines will be differentiated and your
backend will not be confused. Note that you may need to re-set the
backend name in mythtv-setup and the IP. As noted in the thread, you
have been sneaking by, using 'localhost'
Geoff
More information about the mythtv-users
mailing list