Mythtv install questions

Installed opensuse about 2 months ago and tried to get mythtv installed. Followed the guide at Mythtv - OpenSuSE 13.1 at https://www.mythtv.org/wiki/OpenSuSE_13.1. Failed and moved on for awhile. Pulled up up part of my bash history which is listed below.

bash history:

sudo zypper install libxine2-codecs k3b-codecs ffmpeg lame gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer-plugins-ugly-orig-addon gstreamer-plugins-libav libdvdcss2
sudo cp NXP7164-2010-03-10.1.fw /lib/firmware
sudo joe /etc/X11/xorg.conf
sudo reboot
xdpyinfo |grep res
sudo zypper update
sudo zypper ps
sudo reboot
sudo zypper update
sudo zypper ar -f -n packman-essentials
sudo zypper ar -f -n packman-essentials http://packman.inode.at/suse/openSUSE_13.1/Essentials/
sudo zypper ar -f -n packman-essentials http://packman.inode.at/suse/openSUSE_13.1/Essentials/ packman-essentials
sudo zypper ar -f -n packman-multimedia http://packman.inode.at/suse/openSUSE_13.1/Multimedia/ packman-multimedia
sudo reboot
sudo zypper update
sudo zypper in libmyth-0_27 mythtv-0_27-backend mythtv-0_27-frontend mythtv-0_27-setup mythtv-0_27-common mythtv-0_27-docs mythzoneminder-0_27 perl-MythTV-0_27 libmyth-0_27-devel  mariadb-tools # temporary work-around for mysql_tzinfo_to_sql which we will need to address a problem later.
sudo useradd mythtv
mysqladmin -u root password somepasswd
mysql -u root -p

Didn’t really understand the two “Start the Database” and “Configure mythTV server components (mythbackend)” sections of the above mentioned mythtv guide so I skipped to the “Create the Database” section.

mysql commands:

MariaDB (none)]> create database mythconverg;
ERROR 1007 (HY000): Can't create database 'mythconverg'; database exists
MariaDB (none)]> create user 'mythtv'@'%' identified by 'mythtv';
ERROR 1396 (HY000): Operation CREATE USER failed for 'mythtv'@'%'
MariaDB (none)]> \q

Not really sure where to start now and wonder if there is an easier way to get mythtv installed in opensuse? Any guidance would be greatly appreciated.

It’s a complicated initial set up but it’s good once you get going.
To organise the mythconverg database you should read the Mysql tutorial for start up. It helps with set up and creating users. (You don’t need to scour the whole thing of course - but it’s all in useful sections).
If you work through that and come back to us if you have any specific questions.
I’m no expert but I managed it.

Thanks for your answer but I feel a bit dense and need a specific reference point to get started. I can usually follow a recipe, I just need to know where to find the right one.

Assumption 1:
I should be using the guide at Mythtv - OpenSuSE 13.1 at https://www.mythtv.org/wiki/OpenSuSE_13.1.

Assumption 2:
When I reach the following section listed below in this guide I should click the Mythtv database setup link.

Start the Database
Yast, Services Manager, select mysql and click Start & Enable.

http://www.mythtv.org/wiki/User_Manual:Initial_Installation#MythTV_database_setup

A. Once there I should use the instructions to create the file for mythtv for database connections ~mythtv/.mythtv/mysql.txt.

B. Then I should open mysql/maria and enter the followings commands:

create database mythconverg;
create user 'mythtv'@'%' identified by 'mythtv';
create user 'mythtv'@'localhost' identified by 'mythtv';
set password for 'mythtv'@'%' = password('mythtv');
connect mythconverg;
grant all privileges on *.* to 'mythtv'@'%' with grant option;
grant all privileges on *.* to 'mythtv'@'localhost' with grant option;
flush privileges;
exit;

c. Debug problems.
D. Continue with more mythtv setup/

Is this close?

That’s pretty much what I did although I don’t think you need ‘set password …’ as you’ve already done this with ‘identified by …’. And I didn’t do the ‘mythtv@%’ bit and as far as I recall the mythconverg db is created by Mythtv-setup so you don’t need to. This is presumably why you got the mysql error mentioned in your first post.

Are you having further problems?

If you can let us know. I may not always be able to help but I’m sure someone will be able.

Been off the computer for a bit staining the home exterior. Got back at mythtv tonight and got things generally going.

There was an error in the first run of mythtv-setup while setting up mythconfig. Is this serious?

2015-08-30 18:45:22.117961 E  Error preparing query: SELECT DISTINCT dirname FROM storagegroup WHERE groupname = :GROUP AND hostname = :HOSTNAME
2015-08-30 18:45:22.117985 E  Driver error was [2/1146]:
QMYSQL3: Unable to prepare statement
Database error was:
Table 'mythconverg.storagegroup' doesn't exist

2015-08-30 18:45:22.118168 E  DB Error (StorageGroup::StorageGroup()):
Query was:
SELECT DISTINCT dirname FROM storagegroup WHERE groupname = :GROUP AND hostname = :HOSTNAME
Bindings were:
:GROUP="Themes", :HOSTNAME="pc-microraptor-lan"
Driver error was [2/1064]:
QMYSQL: Unable to execute query
Database error was:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':GROUP AND hostname = :HOSTNAME' at line 1 

A list of what is in this table now:

MariaDB [mythconverg]> SELECT * FROM storagegroup;
+----+-------------+--------------------+-----------------------------------+
| id | groupname   | hostname           | dirname                           |
+----+-------------+--------------------+-----------------------------------+
|  1 | Default     | pc-microraptor-lan | /home/theatre/mythtv/recordings/  |
|  2 | LiveTV      | pc-microraptor-lan | /home/theatre/mythtv/livetv/      |
|  3 | DB Backups  | pc-microraptor-lan | /home/theatre/mythtv/db_backups/  |
|  4 | Videos      | pc-microraptor-lan | /home/theatre/mythtv/videos/      |
|  5 | Trailers    | pc-microraptor-lan | /home/theatre/mythtv/trailers/    |
|  6 | Coverart    | pc-microraptor-lan | /home/theatre/mythtv/coverart/    |
|  7 | Fanart      | pc-microraptor-lan | /home/theatre/mythtv/fanart/      |
|  8 | Screenshots | pc-microraptor-lan | /home/theatre/mythtv/screenshots/ |
|  9 | Banners     | pc-microraptor-lan | /home/theatre/mythtv/banners/     |
| 10 | Streaming   | pc-microraptor-lan | /home/theatre/mythtv/streaming/   |
+----+-------------+--------------------+-----------------------------------+
10 rows in set (0.00 sec)

Second, what is the best way to auto-start mysql and mythbackend?

I have a third problem with the results of mythfilldatabase appearing to download from schedulesdirect but not show up in the mythtv frontend.

Thanks,
Kurt

When I start mythbackend manually the tv stations all run. I made multiple mistakes in the install however. So I’ll focus first on starting the backend.

Mythtv has both systemd and init.d scripts and both fail.

theatre@pc-microraptor-lan:~> sudo systemctl start mythbackend.service
root's password:
Job for mythbackend.service failed. See "systemctl status mythbackend.service" and "journalctl -xn" for details.
theatre@pc-microraptor-lan:~> systemctl status mythbackend.service
mythbackend.service - MythTV backend service
   Loaded: loaded (/usr/lib/systemd/system/mythbackend.service; disabled)
   Active: failed (Result: resources)
theatre@pc-microraptor-lan:~> sudo /etc/init.d/mythbackend start
/etc/sysconfig/mythbackend not existing

Both both the mythbackend.service and init.d mythbackend scripts are looking for the file /etc/sysconfig/mythbackend.

mythbackend.service:

EnvironmentFile=/etc/sysconfig/mythbackend

&

mythbackend in /etc/init.d/:

Check for existence of needed config file and read it

MYTHBACKEND_CONF=/etc/sysconfig/mythbackend
test -r $MYTHBACKEND_CONF || { echo “$MYTHBACKEND_CONF not existing”;
if “$1” = “stop” ]; then exit 0;
else exit 6; fi; }

  1. Does someone have an example of the /etc/systemd/mythbackend config file for opensuse that I can emulate?

  2. /var/log/mythtv/ contains no log files. Any ideas why? Mythlogserver is running.

Thanks,
Kurt

  1. Added mythbackend user to mythtv group.
  2. Created dummy file /etc/sysconfig/mythbackend so systemctr could start service.
  3. $ sudo systemctl enable mythbackend.service ## to start backend
  4. Ran mythtv-setup to run retrieve lineup option in video source section to define zip code for Schedules Direct to download correct tv lineup for my city.
  5. sudo reboot

Currently mythfilldatabase seems to download from schedules direct, can play tv channels, can set up a tv show recording, and see log files in /var/log/mythtv.

Still have trouble:

  1. Stopping and starting mythbackend correctly when running mythtv-setup.
  2. Getting a meta-tag service for movies.
  3. Getting working sound for mkv files in the video library.