I use MythTv but after upgrading I can't connect to the database.
I can connect to the database from the command prompt:
- Code: Select all
[anders@localhost mythtv]$ pwd
/var/log/mythtv
[anders@localhost mythtv]$ mysql --user=mythtv -p
Enter password: ????????
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 10.1.41-MariaDB Mageia MariaDB Server
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 ;
Database changed
MariaDB [mythconverg]> select count(*) from videometadata ;
+----------+
| count(*) |
+----------+
| 525 |
+----------+
1 row in set (0.00 sec)
MariaDB [mythconverg]> exit;
Bye
When I run the mythtv-setup from the command prompt, the following is in the log:
- Code: Select all
anders@localhost mythtv]$ pwd
/var/log/mythtv
[anders@localhost mythtv]$ date
Mon Oct 7 15:38:42 CEST 2019
[anders@localhost mythtv]$ mythtv-setup
[anders@localhost mythtv]$ cat mythbackend.20191006120744.15498.log
2019-10-06 14:07:44.584664 C [15498/15498] thread_unknown mythcommandlineparser.cpp:2607 (ConfigureLogging) - mythbackend version: fixes/30.0 [30.0-20190121.1.mga6.tainted (aka v30.0-3-g44fee)] www.mythtv.org
2019-10-06 14:07:44.584674 C [15498/15498] thread_unknown mythcommandlineparser.cpp:2609 (ConfigureLogging) - Qt version: compile: 5.9.4, runtime: 5.9.4
2019-10-06 14:07:44.584675 N [15498/15498] thread_unknown mythcommandlineparser.cpp:2611 (ConfigureLogging) - Enabled verbose msgs: general
2019-10-06 14:07:44.584713 N [15498/15498] thread_unknown logging.cpp:702 (logStart) - Setting Log Level to LOG_INFO
2019-10-06 14:07:44.595029 I [15498/15508] Logger logging.cpp:296 (run) - Added logging to the console
2019-10-06 14:07:44.595242 I [15498/15507] LogForward loggingserver.cpp:129 (FileLogger) - Added logging to /var/log/mythtv/mythbackend.20191006120744.15498.log
2019-10-06 14:07:44.595248 I [15498/15498] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Interrupt handler
2019-10-06 14:07:44.595252 I [15498/15498] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Terminated handler
2019-10-06 14:07:44.595256 I [15498/15498] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Segmentation fault handler
2019-10-06 14:07:44.595259 I [15498/15498] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Aborted handler
2019-10-06 14:07:44.595263 I [15498/15498] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Bus error handler
2019-10-06 14:07:44.595266 I [15498/15498] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Floating point exception handler
2019-10-06 14:07:44.595269 I [15498/15498] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Illegal instruction handler
2019-10-06 14:07:44.595274 I [15498/15498] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Real-time signal 0 handler
2019-10-06 14:07:44.595278 I [15498/15498] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Hangup handler
2019-10-06 14:07:44.595304 N [15498/15498] thread_unknown mythdirs.cpp:37 (InitializeMythDirs) - Read conf dir = /var/lib/mythtv
2019-10-06 14:07:44.595342 N [15498/15498] thread_unknown mythdirs.cpp:203 (InitializeMythDirs) - Using runtime prefix = /usr
2019-10-06 14:07:44.595344 N [15498/15498] thread_unknown mythdirs.cpp:205 (InitializeMythDirs) - Using configuration directory = /var/lib/mythtv
2019-10-06 14:07:44.595377 I [15498/15498] CoreContext mythcorecontext.cpp:272 (Init) - Assumed character encoding: en_DK.UTF-8
2019-10-06 14:07:44.595530 I [15498/15498] CoreContext mythcontext.cpp:641 (LoadDatabaseSettings) - Empty LocalHostName. This is typical.
2019-10-06 14:07:44.595532 I [15498/15498] CoreContext mythcontext.cpp:650 (LoadDatabaseSettings) - Using a profile name of: 'localhost' (Usually the same as this host's name.)
2019-10-06 14:07:44.595556 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
2019-10-06 14:07:45.596356 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 1, status dbAwake, Delay: 2000
2019-10-06 14:07:50.599422 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 2, status dbAwake, Delay: 2000
2019-10-06 14:07:55.602357 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 3, status dbAwake, Delay: 2000
2019-10-06 14:08:00.605723 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 4, status dbAwake, Delay: 2000
2019-10-06 14:08:05.609089 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 5, status dbAwake, Delay: 2000
2019-10-06 14:08:10.612414 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 6, status dbAwake, Delay: 2000
2019-10-06 14:08:15.615608 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 7, status dbAwake, Delay: 2000
2019-10-06 14:08:20.618896 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 8, status dbAwake, Delay: 2000
2019-10-06 14:08:25.621849 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 9, status dbAwake, Delay: 2000
2019-10-06 14:08:30.624835 I [15498/15498] CoreContext mythcontext.cpp:900 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 10, status dbAwake, Delay: 2000
2019-10-06 14:08:35.627773 I [15498/15498] CoreContext mythcontext.cpp:1023 (TestDBconnection) - [b]Start up failure. host localhost, status dbAwakeFail[/b]
2019-10-06 14:08:36.627999 C [15498/15498] CoreContext main.cpp:138 (main) - Failed to init MythContext.
The Config file that is changed from the mythtv-setup looks like this:
- Code: Select all
[anders@localhost mythtv]$ cat /home/anders/.mythtv/config.xml
<Configuration>
<LocalHostName>my-unique-identifier-goes-here</LocalHostName>
<Database>
<PingHost>1</PingHost>
<Host>localhost</Host>
<DBHostName>localhost</DBHostName>
<UserName>mythtv</UserName>
<Password>????????</Password>
<DatabaseName>mythconverg</DatabaseName>
<Port>3306</Port>
</Database>
<WakeOnLAN>
<Enabled>0</Enabled>
<SQLReconnectWaitTime>0</SQLReconnectWaitTime>
<SQLConnectRetry>5</SQLConnectRetry>
<Command>echo 'WOLsqlServerCommand not set'</Command>
</WakeOnLAN>
<UPnP>
<UDN>
<MediaRenderer>a699d0ee-f939-4743-8c5a-d08ef5d21ee3</MediaRenderer>
</UDN>
</UPnP>
</Configuration>
If I change the host name from the mythtv-setup program, the <Host> field is changed.
I've changed the field to: ip address on server, 127.0.0.1 it makes no difference.
From mythtv-setup I've changed port to 6543, 6544 but it doesn't help either.
A db backup was made and it provided additional information:
- Code: Select all
[anders@localhost mythtv]$ ./mythconverg_backup.pl --verbose
Configuring environment:
- username: anders
- HOME: /home/anders
- MYTHCONFDIR: /home/anders/.mythtv
Parsing configuration files:
- checking: /home/anders/.mythtv/config.xml
parsing: /home/anders/.mythtv/config.xml
- checking: /home/anders/.mythtv/backuprc
parsing: /home/anders/.mythtv/backuprc
Applying command-line arguments.
Checking configuration.
No DBSchemaVer specified, querying database.
Found DBSchemaVer: 1344.
Database Information:
DBHostName: localhost
DBPort: 3306
DBUserName: mythtv
DBPassword: XXX
DBName: mythconverg
DBSchemaVer: 1344
DBBackupDirectory: /home/anders/Documents
DBBackupFilename: mythconverg-1344-20191008085349.sql
Executables:
mysqldump: mysqldump
compress: gzip
Attempting to use supplied password for mysqldump.
Any [client] or [mysqldump] password specified in the MySQL options file will
take precedence.
Executing command:
'/usr/bin/mysqldump' --defaults-extra-file='/tmp/veryAuQJ3H' --host='localhost' --port='3306' --user='mythtv' --add-drop-table --add-locks --allow-keywords --complete-insert --extended-insert --lock-tables --no-create-db --quick --add-drop-table 'mythconverg' 2>&1 1>'/home/anders/Documents/mythconverg-1344-20191008085349.sql'
mysqldump exited with status: 0
Attempting to compress backup file.
- Compressing backup file with IO::Compress::Gzip.
Successfully compressed backup to file:
/home/anders/Documents/mythconverg-1344-20191008085349.sql.gz
Rotating backups.
Searching for files matching pattern:
/home/anders/Documents/mythconverg-????-??????????????.sql*
- Found 1 matching files.
Deleting 0 and keeping (up to) 5 backup files.
- Keeping backup file: /home/anders/Documents/mythconverg-1344-20191008085349.sql.gz
Looks like backup went well:
- Code: Select all
[anders@localhost mythtv]$ ls -l /home/anders/Documents/mythconverg-1344-20191008085349.sql*
-rw-r--r-- 1 anders anders 638234 Oct 8 08:53 /home/anders/Documents/mythconverg-1344-20191008085349.sql.gz
Where / how can I look up which values to use ?
Thank you in advance for your help.
Best regards
Anders