[mythtv-users] BE3 - Issues with installation and database

Stephen Worthington stephen_agent at jsw.gen.nz
Sun May 19 09:42:40 UTC 2019


On Sat, 18 May 2019 17:30:21 -0500, you wrote:

>
>Hi Folks!
>
>
>Well, I’m not sure what I did but seems MariaDB is now starting. It’s 
>all Bill’s fault: he wrote “Google” and Curious Kitty here got playing 
>with the keyboard
. <joke>
>
>
>Found this site: 
>https://stackoverflow.com/questions/40997257/mysql-service-fails-to-start-hangs-up-timeout-ubuntu-mariadb 
>OK, similar to my issue. Does suggest turning off apparmor as known bug 
>with MySQL previous installed to MariaDB. OK, I don’t make things worse 
>so just temporarily turned off apparmor; the system is isolated as the 
>Ethernet cable is unplugged.
>
>
>I had kept a copy of the Terminal session – in the box:
>
>
>
>barry at Backend-3:~$ sudo systemctl stop apparmor
>
>[sudo] password for barry:
>
>barry at Backend-3:~$ sudo systemctl disable apparmor
>
>Synchronizing state of apparmor.service with SysV service script with 
>/lib/systemd/systemd-sysv-install.
>
>Executing: /lib/systemd/systemd-sysv-install disable apparmor
>
>barry at Backend-3:~$
>
>
>
>
>barry at Backend-3:~$ service --status-all
>
>[ - ] apparmor
>
>
>/Use the site’s instructions to turn apparmor back on; verify is working/
>
>
>barry at Backend-3:~$ sudo service mariadb start
>
><wait a long time....>
>
>Job for mariadb.service failed because a timeout was exceeded.
>
>See "systemctl status mariadb.service" and "journalctl -xe" for details.
>
>barry at Backend-3:~$
>
>
>So at this point looked I looked at systemctl status mariadb.service – 
>it’s off, same as before. The file (in the block, above) has a time 
>stamp of 12:32.
>
>
>I had taken a break, come back to see if could find something 
>worthwhile; typed some command to check on things and notice a message 
>stating mariadb has been running since approximately 12:30-something. 
>The message gives the exact time but I’m rather exited to see something 
>positive; insert a thumbdrive to capture but the system locked up. ;(
>
>
>Now getting this:
>
>barry at Backend-3:~$ systemctl status mariadb.service
>
>? mariadb.service - MariaDB 10.1.38 database server
>
>Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor 
>preset: enabled)
>
>Active: active (running) since Sat 2019-05-18 15:41:17 CDT; 3min 3s ago
>
>Docs: man:mysqld(8)
>
>https://mariadb.com/kb/en/library/systemd/
>
>Process: 1134 ExecStartPost=/bin/sh -c systemctl unset-environment 
>_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
>
>Process: 1131 ExecStartPost=/etc/mysql/debian-start (code=exited, 
>status=0/SUCCESS)
>
>Process: 903 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] 
>&& VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl 
>set-environment _WSREP_START_POSITION=$VAR || exit 1 (code
>
>Process: 900 ExecStartPre=/bin/sh -c systemctl unset-environment 
>_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
>
>Process: 895 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d 
>/var/run/mysqld (code=exited, status=0/SUCCESS)
>
>Main PID: 1005 (mysqld)
>
>Status: "Taking your SQL requests now..."
>
>Tasks: 27 (limit: 4915)
>
>CGroup: /system.slice/mariadb.service
>
>??1005 /usr/sbin/mysqld
>
>
>May 18 15:41:10 Backend-3 systemd[1]: Starting MariaDB 10.1.38 database 
>server...
>
>May 18 15:41:13 Backend-3 mysqld[1005]: 2019-05-18 15:41:13 
>140244898974848 [Note] /usr/sbin/mysqld (mysqld 
>10.1.38-MariaDB-0ubuntu0.18.04.2) starting as process 1005 ...
>
>May 18 15:41:17 Backend-3 systemd[1]: Started MariaDB 10.1.38 database 
>server.
>
>May 18 15:41:20 Backend-3 /etc/mysql/debian-start[1137]: 
>/usr/bin/mysql_upgrade: the '--basedir' option is always ignored
>
>May 18 15:41:20 Backend-3 /etc/mysql/debian-start[1137]: Looking for 
>'mysql' as: /usr/bin/mysql
>
>May 18 15:41:20 Backend-3 /etc/mysql/debian-start[1137]: Looking for 
>'mysqlcheck' as: /usr/bin/mysqlcheck
>
>May 18 15:41:20 Backend-3 /etc/mysql/debian-start[1137]: This 
>installation of MySQL is already upgraded to 10.1.38-MariaDB, use 
>--force if you still need to run mysql_upgrade
>
>May 18 15:41:20 Backend-3 /etc/mysql/debian-start[1159]: Checking for 
>insecure root accounts.
>
>~
>
>
>So looks like it/something has started but MythTV (BackendSetup) still 
>is not seeing any sign of a Database: “No UPnP backends found”. ...The 
>later using the MythTV Backend Setup icon at ‘Show Applications’ and at 
>Terminal ‘mythtv-setup’ – what’s the command to enable logging?? --help 
>doesn’t display a help screen.
>
>
>TIA! Hope I didn’t screw something else up!
>
>Barry

OK, now verify that MariaDB is actually running by using the mysql
command:

sudo mysql
show databases
quit

If MariaDB is working, you should get output something like this:

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 1261
Server version: 10.1.38-MariaDB-0ubuntu0.18.04.2 Ubuntu 18.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

MariaDB [mythconverg]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mythconverg        |
+--------------------+
2 rows in set (0.00 sec)

MariaDB [mythconverg]> quit
Bye

If you get that, then MariaDB is working.  Next you need to work out
how mythbackend connects to MariaDB.  If mythbackend is connecting on
localhost (127.0.0.1), then it should just work now.  If it is
connecting on the PC's external IP address, you need to verify if
MariaDB is listening on the external IP address.  What is the output
of this command:

netstat -l -n -p | grep mysql

I get this:

tcp6       0      0 :::3306                 :::* LISTEN
2489/mysqld
unix  2      [ ACC ]     STREAM     LISTENING     35742    2489/mysqld
/var/run/mysqld/mysqld.sock

So my MariaDB (mysqld) is listening for connections on all IPv4 and
IPv6 addresses on port 3306 (the tcp6 line), plus on a unix socket
(the unix line).

Go into mythtv-setup and check what settings you have for General >
Host Address Backend Setup > Primary IP address / DNS name.  Is it
127.0.0.1 or localhost?  Or is it the IP address of the PC?  And are
the "Allow Connections from all Subnets" and "Listen on All IP
Addresses" options above that ticked or not?


More information about the mythtv-users mailing list