[mythtv-users] 0.28 upgrade issue frontend connection

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Jul 17 02:16:44 UTC 2016


On Sat, 16 Jul 2016 18:07:20 -0400, you wrote:

>On Sat, Jul 16, 2016 at 5:42 PM, Hika van den Hoven <hikavdh at gmail.com>
>wrote:
>
>> Hoi Steve,
>>
>> Saturday, July 16, 2016, 11:30:57 PM, you wrote:
>>
>> > I thought that was what mythtv.cnf was for, which I've set to my
>> > local ip.  I just tried setting mysqld.cnf
>> > "bind-address=my_ip_address"  and it hasn't worked.
>>
>> > I can still manually call up mysql -umyth  -p, but mysql
>> > -h192.168.1.x -umyth -p gives me ERROR 1045 (28000):  Access denied
>> > for user 'mythtv'@'my_hostname' (using password: YES).
>> > Incidentally, same with the root mysql account. I can connect from
>> > my secondary backend via the ip address. It just won't accept an
>> > login via the IP address local to the server.
>>
>> > Steve
>>
>> > On Sat, Jul 16, 2016 at 3:27 PM, Steve Greene <sgreene59 at verizon.net>
>> wrote:
>>
>> > Since upgrading to 0.28 and Mint 18, my local frontend connects to
>> > "localhost" but not the IP address of the MBE (which is local).
>>
>> > mysql -h"my_IP_ADDR" -u myth -p will fail, but mysql -umythtv -p
>> > will connect. Do I have to add the IP address to one of the tables in
>> mythconverg?
>>
>> > Thanks in advance for your assistance.
>>
>> > Steve
>> >
>>
>> Have you setup a user for that location in mysql. You have to setup
>> the user/password for the locations from where you want to have
>> access. So localhost or an IP address or % for all machines.
>>
>>
>> mysql> SELECT user, host from user;
>> +------------------+-------------+
>> | user             | host        |
>> +------------------+-------------+
>> | mythtv           | %           |
>> | mythtv           | 192.168.1.2 |
>> | mythtv           | bilbo.home  |
>> | debian-sys-maint | localhost   |
>> | mysql.sys        | localhost   |
>> | root             | localhost   |
>> +------------------+-------------+
>>
>
>Shouldn't this cover all the locations?
>
>
>This is super-frustrating, I always expect that a database restore from a
>working setup should "just work". It never does.
>
>How do I turn on more helpful debugging messages? /var/log/mysql/error.log
>gives me nothing more than what I've seen from command-line login attempts.
>
>Steve

The database you are backing up and restoring is "mythconverg".  The
database that the user table is in is "mysql", so it is not part of
the mythconverg database and is not backed up and restored.  Hence
your problem when restoring mythconverg into a completely new mysql
system.  If you upgrade the system in place, the mysql database is
preserved and these problems do not happen.

Not only do the correct users need to be set created, they also need
to have the correct access rights set up.  So the appropriate mysql
"grant" commands also need to have been done for each user.  See

  https://www.mythtv.org/wiki/Database_Setup

in the section "Modifying access to the MySQL database for multiple
systems" for how to do that.  So you may need to run these commands:

  grant all on mythconverg.* to mythtv@"%" identified by "mythtv";
  flush privileges;

or something like.  Since you did not post the exact error message you
are getting, it is impossible to say for sure.

Also, now that you have multiple config files for mysql, you have to
remember that they are loaded in order and config in one file will be
overridden by config in a file that is loaded later.  So you need to
grep the entire /etc/mysql and all its subdirectories for the
bindaddress option and make sure that they are all commented out, or
create or find the last file with one in it and set it to the right
value.  In my case (Mythbuntu 14.04), I have created a
/etc/mysql/conf.d/mythtv-tweaks-jsw.cnf file which is always the last
one loaded and put my mysql setup tweaks in there.  That includes a
"bindaddress=0.0.0.0" line.  Different distros have different setups
for how they load the config files, so you may have to look at the
config file that is loaded first by mysql (normally /etc/mysql/my.cnf)
for the "!include" lines and then follow the include setup from there
to figure out what order the config files are loaded in.  When a
config directory is !included, all the files in that directory are
loaded in alphanumeric order by filename.  If any of those files have
!include lines, those are executed (and the specified files loaded) as
those lines are read.


More information about the mythtv-users mailing list