[mythtv-users] BE3 - Issues with installation and database
Barry Martin
barry3martin at gmail.com
Wed May 22 21:01:28 UTC 2019
Hi Stephan!
Unplugged Ethernet to BE-2, plugged in Backend-3 (the one we’re working
on). Didn’t want to do something and accidentally screw up and do a
capture like I had managed to a while back with BE-1.
It should not be necessary to do that, as you already have permissions
set for 'mythtv'@'%', which will match 'mythtv'@'127.0.0.1'.
Right: I think the problem was more the computer seeing an active
Ethernet connection. As noted above, unplugged BE-2, plugged in
BE-3. Issued a *sudo mysql* and seeing that prompt as
*MariaDB[(none)]*. Backtracking to yesterday’s message to see if
will correct (thinking ‘not held’ because not seeing any networking.)
sudo mysql from above
use mythconverg; OK, that now display a prompt of MariaDB
[(mythconverg)]
Hmmm: exited (quit), sudo mysql, back to the (none).
reapply use mythcoverg;
Hmm: at Terminal *mysql -h 192.168.0.3 -u mythtv -p mythconverg*I
get ERROR 2003 (HY000); Can’t connect to MySQL server on
‘192.168.0.3’ (111 “Connection refused). I’m almost guessing has
something to do with loosing the database use command, thoughI think
being told to use it at the end of the command line you gave me.
barry at Backend-3:~$ mysql mythconverg
ERROR 1698 (28000): Access denied for user 'barry'@'localhost'
You might like to add a GRANT for user 'barry' also, as that means you
can use the "mysql" command without sudo from your normal login
(except for doing GRANT commands or adding users):
sudo mysql
GRANT ALL ON mythconverg.* TO barry@'%' IDENTIFIED BY "B*****6";
FLUSH PRIVILEGES;
quit
Used this option.
Thought I noted an error as transcribing the notes but same errors:
needed *sudo* and the MariaDB prompt as back to (none).
barry at Backend-3:~$ mysql -h 192.168.0.3 -u mythtv -p mythconverg
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.3'
(111 "Connection refused")
barry at Backend-3:~$
barry at Backend-3:~$
barry at Backend-3:~$
barry at Backend-3:~$ sudo mysql -h 192.168.0.3 -u mythtv -p mythconverg
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.3'
(111 "Connection refused")
/This section is from before the ‘thought found an error”, above:/
barry at Backend-3:~$ sudo mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 111
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 [(none)]> use mythconverg;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [mythconverg]> show grants;
+------------------------------------------------------------------------------------------------+
| Grants for root at localhost |
+------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED VIA
unix_socket WITH GRANT OPTION |
| GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION |
+------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
MariaDB [mythconverg]>
MariaDB [mythconverg]> GRANT ALL ON mythconverg.* TO barry@'%'
IDENTIFIED BY 'BJM1212406';
Query OK, 0 rows affected (0.02 sec) <== "zero rows" doesn't seem right
MariaDB [mythconverg]>
Another potential clue of where stuff went wrong:
MariaDB [mythconverg]> select * from settings where value like
'%serverip%';
I got a return of “Empty set”.
That error "Network is unreachable" says that the Ethernet cable is
out or for some other reason the 192.168.0.3 address has not been
assigned to the Ethernet port.
<snip>
Check the output of this command:
ifconfig
barry at Backend-3:~$ ifconfig
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.3 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::b7bd:5dcd:8b98:5ce2 prefixlen 64 scopeid 0x20<link>
ether 74:d4:35:9e:04:35 txqueuelen 1000 (Ethernet)
RX packets 3736 bytes 663902 (663.9 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 752 bytes 88062 (88.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 4221 bytes 216282 (216.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4221 bytes 216282 (216.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
barry at Backend-3:~$
IIRC without the Ethernet cable connected (so BE3 wouldn’t attack
and maim BE2!) the wired connection section started with the ether line.
<snip>
As soon as you do that, mythbackend will start up too
soon, before that IP address is available on the Ethernet port. So it
will not work after boot, but will if you restart it after the network
is up:
sudo restart mythtv-backend
Found another potential error, or could be just a shortcut command I
don’t have installed:
barry at Backend-3:~$ sudo restart mythtv-backend
sudo: restart: command not found
barry at Backend-3:~$
barry at Backend-3:~$
barry at Backend-3:~$ sudo systemctl stop mythtv-backend
barry at Backend-3:~$ sudo systemctl start mythtv-backend
barry at Backend-3:~$
Both of these went to prompt immediately. Seems like should be a bit
of a delay. (BE3 is fast but not that fast!)
Then thought I’d try:
barry at Backend-3:~$ mythtv-setup
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.3'
(111 "Connection refused")
Gtk-Message: 14:23:58.949: GtkDialog mapped without a transient
parent. This is discouraged.
Figure error 2003 due to the mysql/mythcoverg/etc., errors; the
second (discouraged) is just an advisory.
Tomorrow I may not be able to respond as have a few appointments scattered throughout the day, and as I am uncomfortable have Backend-3 and Backend-2 connected to the network at the same time until the problem is resolved might miss my window of experimentation. Plus gives you a chance to get get over the headache I’ve been given you. <joke>
Thanks again for the assistance! Right now it seems like something simple we’re overlooking.
Barry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20190522/6fb7a7d4/attachment.html>
More information about the mythtv-users
mailing list