[mythtv-users] Gentoo mythbackend setup and logging

Hika van den Hoven hikavdh at gmail.com
Sun Mar 1 00:12:23 UTC 2015


Hoi david,

Sunday, March 1, 2015, 12:37:53 AM, you wrote:

> On Mon, Feb 23, 2015 at 6:44 AM, Hika van den Hoven <hikavdh at gmail.com>
> wrote:

>> Hoi Karl,
>>
>> Monday, February 23, 2015, 6:33:10 AM, you wrote:
>>
>> > On Sun, Feb 22, 2015 at 12:33 AM, Hika van den Hoven <hikavdh at gmail.com>
>> > wrote:
>>
>> >> Hoi Karl,
>> >>
>> >> Sunday, February 22, 2015, 6:40:18 AM, you wrote:
>> >>
>> >> > On Sat, Feb 21, 2015 at 2:57 PM, david brooke <
>> david2012brooke at gmail.com
>> >> >
>> >> > wrote:
>> >>
>> >> >> On Sat, Feb 21, 2015 at 12:28 PM, Bill Meek <keemllib at gmail.com>
>> wrote:
>> >> >>
>> >> >>> On 02/21/2015 11:10 AM, Karl Newman wrote:
>> >> >>>
>> >> >>>> On Sat, Feb 21, 2015 at 1:49 AM, Mike Perkins <
>> >> >>>> mikep at randomtraveller.org.uk>
>> >> >>>> wrote:
>> >> >>>>
>> >> >>>>  On 21/02/15 04:56, david brooke wrote:
>> >> >>>>>
>> >> >>>> ...
>> >> >>>
>> >> >>>> 4. You'll also need to check that the "networking" feature of
>> MySQL is
>> >> >>>>>> turned on. Check that /etc/mysql/my.cnf does not contain
>> >> >>>>>> skip-networking.
>> >> >>>>>> If it does, either remove that line or comment it out. Also
>> verify
>> >> that
>> >> >>>>>> bind-address is set to your IP address instead of 127.0.0.1. If
>> you
>> >> >>>>>> change
>> >> >>>>>> either of these items, restart MySQL.
>> >> >>>>>>
>> >> >>>>> ...
>> >> >>>
>> >> >>> I would check the /etc/mysql/my.cnf file and see if it has a line
>> >> >>> like this:
>> >> >>>
>> >> >>>     !includedir /etc/mysql/conf.d
>> >> >>>
>> >> >>> probably at the end of the file. If so, then make any changes to
>> >> >>> the configuration in a file under conf.d. Call the file there
>> >> >>> anything you like but it must end in .cnf. As an example:
>> >> >>>
>> >> >>>     [mysqld]
>> >> >>>     bind-address=::
>> >> >>>     max_connections = 100
>> >> >>>
>> >> >>> In the *buntu world, the package maintainer may change the my.cnf
>> >> >>> file and even though users are given a prompt, sometimes it's
>> >> >>> missed/ignored and local changes vanish. Maybe not true for Gentoo.
>> >> >>>
>> >> >>> --
>> >> >>> Bill
>> >> >>>
>> >> >>> _______________________________________________
>> >> >>> mythtv-users mailing list
>> >> >>> mythtv-users at mythtv.org
>> >> >>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> >> >>> http://wiki.mythtv.org/Mailing_List_etiquette
>> >> >>> MythTV Forums: https://forum.mythtv.org
>> >> >>>
>> >> >>
>> >> >> I have made the adjustments suggested by others.
>> >> >>
>> >> >>
>> >> >> 1. Install the MythTV
>> >> >>
>> >> >> # emerge -av mythtv
>> >> >>
>> >> >> 2. Enable and start MySQL
>> >> >>
>> >> >> # rc-update add mysql default && rc-service mysql start
>> >> >>
>> >> >> 3. You'll also need to check that the "networking" feature of MySQL
>> is
>> >> >> turned on. Check that /etc/mysql/my.cnf does not contain
>> >> skip-networking.
>> >> >> If it does, either remove that line or comment it out. Also verify
>> that
>> >> >> bind-address is set to your IP address instead of 127.0.0.1.
>> >> Alternatively
>> >> >> /etc/conf.d/mysql can be used to address skip-networking and
>> >> bind-address.
>> >> >> Set MY_ARGS="--bind-address=masterbackendipaddress" and
>> skip-networking
>> >> >> default is off. If you change either of these items, restart MySQL.
>> >> >>
>> >> >> 4. Setup mysql and add a password:
>> >> >>
>> >> >> # mysql_secure_installation
>> >> >>
>> >> >> 5. Create the database structure: (See example using root as user and
>> >> 1234
>> >> >> as password)
>> >> >>
>> >> >> # mysql -u root -p1234 /usr/share/mythtv/database/mc.sql
>> >> >>
>> >> >> 6. Update your database (Optional with new install): (See example
>> using
>> >> >> root as user and 1234 as password)
>> >> >>
>> >> >> # mysql_upgrade -u root -p1234
>> >> >>
>> >> >> 7. Add time zone tables: (See example using root as user and 1234 as
>> >> >> password)
>> >> >>
>> >> >> $ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p1234
>> mysql
>> >> >>
>> >> >> 8. Allow remote frontends access: (See example using mythtv as user,
>> >> >> mythtv as password and root as user, 1234 as password)
>> >> >>
>> >> >> # mysql -u root -p1234
>> >> >> MariaDB [(none)]> GRANT ALL ON mythconverg.* TO 'mythtv'@
>> '192.168.97.%'
>> >> >> IDENTIFIED BY 'mythtv';
>> >> >> ***Query OK, 0 rows affected (0.00 sec)***output only!
>> >> >> MariaDB [(none)]> FLUSH PRIVILEGES;
>> >> >> ***Query OK, 0 rows affected (0.00 sec)***output only!
>> >> >> MariaDB [(none)]> exit
>> >> >> ***Bye***output only!
>> >> >>
>> >> >> 9. Enable mythbackend
>> >> >>
>> >> >> # rc-update add mythbackend default
>> >> >>
>> >> >> 10. Setup mythbackend
>> >> >>
>> >> >> $ mythtv-setup
>> >> >>
>> >> >> 11. Setup logging for mythfrontend and mythbackend.
>> >> >>
>> >> >> Edit /etc/conf.d/mythfrontend
>> >> >> Replace
>> >> >> #MYTHFRONTEND_OPTS="--syslog local7"
>> >> >> With
>> >> >> MYTHFRONTEND_OPTS="--quiet --logpath /var/log/mythtv"
>> >> >>
>> >> >> Edit /etc/conf.d/mythbackend
>> >> >> Replace
>> >> >> #MYTHBACKEND_OPTS=""
>> >> >> With
>> >> >> MYTHBACKEND_OPTS="--quiet --logpath /var/log/mythtv"
>> >> >>
>> >> >> Looks reasonable. Don't forget to start mythbackend once everything
>> is
>> >> set
>> >> > up. And there may (will) be detours along the way dealing with
>> >> > configuration of various dependencies, etc. Gentoo takes a bit of
>> work,
>> >> > probably more than other distros, but on the plus side you usually
>> know
>> >> > exactly what's running/installed on your system.
>> >>
>> >> > Karl
>> >>
>> >> a few remarks:
>> >> mariadb versus mysql. I don't know which is preferred, but the
>> >> dependency will go with whichever already is installed and if neither
>> >> is installed will install mysql.
>>
>>
>> > Actually mariadb is first in the list of dependencies which satisfy
>> > virtual/mysql, so unless otherwise specified mariadb will be installed.
>>
>> OK, last summer when I did my last fresh install for mythtv it was
>> mysql. But things change.
>>
>>
>> Tot mails,
>>   Hika                            mailto:hikavdh at gmail.com
>>
>> "Zonder hoop kun je niet leven
>> Zonder leven is er geen hoop
>> Het eeuwige dilemma
>> Zeker als je hoop moet vernietigen om te kunnen overleven!"
>>
>> De lerende Mens
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
>>

> Update
> I did an install and had an unexpected result. Step #2 happened as follows:

> CI7 dbrooke # rc-update add mysql default && rc-service mysql start
>  * service mysql added to runlevel default
>  * Caching service dependencies ...
>                                                                 [ ok ]
>  * Checking mysqld configuration for mysql ...
>                                                                  [ ok ]
>  * Starting mysql ...
> !!! SYNC setting found in make.conf.
>     This setting is Deprecated and no longer used.  Please ensure your
> 'sync-type' and 'sync-uri' are set correctly in
> /etc/portage/repos.conf/gentoo.conf
> !!! SYNC setting found in make.conf.
>     This setting is Deprecated and no longer used.  Please ensure your
> 'sync-type' and 'sync-uri' are set correctly in
> /etc/portage/repos.conf/gentoo.conf
> !!! SYNC setting found in make.conf.
>     This setting is Deprecated and no longer used.  Please ensure your
> 'sync-type' and 'sync-uri' are set correctly in
> /etc/portage/repos.conf/gentoo.conf
>  * You don't appear to have the mysql database installed yet.
>  * Please run `emerge --config =dev-db/mariadb-10.0.16` to have this done...
>  * ERROR: mysql failed to start

> The "*!!! SYNC setting found in make.conf.*
> *    This setting is Deprecated and no longer used.  Please ensure your
> 'sync-type' and 'sync-uri' are set correctly in
> /etc/portage/repos.conf/gentoo.conf*"
> can be overlooked as the new sync method wasn't in place yet.
> But this is the important message:
>  ** You don't appear to have the mysql database installed yet.*
> * * Please run `emerge --config =dev-db/mariadb-10.0.16` to have this
> done...*
> So I did as requested:
> CI7 dbrooke # emerge --config =dev-db/mariadb-10.0.16
> Configuring pkg...

>  * Please provide a password for the mysql 'root' user now
>  * or through the /root/.my.cnf file.
>  * Avoid ["'\_%] characters in the password
>     >
>  * Retype the password
>     >
>  * Creating the mysql database and setting proper
>  * permissions on it ...
>  * Command: '/usr/share/mysql/scripts/mysql_install_db' '--basedir=/usr'
>  --loose-skip-grant-tables --loose-skip-host-cache
> --loose-skip-name-resolve --loose-skip-networking --loose-skip-slave-start
> --loose-skip-ssl --loose-skip-log-bin --loose-skip-relay-log
> --loose-skip-slow-query-log --loose-skip-external-locking
> --loose-skip-log-slave-updates --user=mysql '--datadir=///var/lib/mysql'
> '--tmpdir=///tmp/'
>  * Starting mysqld ...
>  * Command //usr/sbin/mysqld             --loose-skip-grant-tables
> --loose-skip-host-cache --loose-skip-name-resolve --loose-skip-networking
> --loose-skip-slave-start --loose-skip-ssl --loose-skip-log-bin
> --loose-skip-relay-log --loose-skip-slow-query-log
> --loose-skip-external-locking --loose-skip-log-slave-updates --user=mysql
>          --user=mysql            --log-warnings=0
>  --basedir=//usr                 --datadir=///var/lib/mysql
>  --max_allowed_packet=8M                 --net_buffer_length=16K
>       --default-storage-engine=MyISAM
>  --socket=//var/run/mysqld/mysqld31550.sock
> --pid-file=//var/run/mysqld/mysqld24737.pid
>  *              --tmpdir=///tmp/
>                                                                  [ ok ]
>  * Setting root password ...
>                                                                 [ ok ]
>  * Loading "zoneinfo", this step may require a few seconds ... ...
>                                                                 [ ok ]
>  * Stopping the server ...
>  * Done

> So I hope this was correct?

This is what I meant with:

> is installed will install mysql. After emerging mysql you should
> emerge the install for mysql. It will help you set it up properly. It
> will be mentioned in the after emerge message. It still will then only
> be setup for localhost only.

So if you want to access it through your ip-address/hostname you have
to edit /etc/mysql/my.cnf. Although I'm not sure with mariadb.
With mysql you change the line:
bind-address = 127.0.0.1
to your actual ip-address

Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list