Can't connect to DB (Mageia system)

For discussion of topics specific to MythTV on linux
anp66
Newcomer
Posts: 7
Joined: Tue Oct 08, 2019 6:22 am
Denmark

Can't connect to DB (Mageia system)

Post by anp66 » Tue Oct 08, 2019 6:31 am

Hi
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)
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) - Start up failure. host localhost, status dbAwakeFail
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.

Where / how can I look up which values to use?

Thank you in advance for your help.

Best regards
Anders

blm-ubunet
Junior
Posts: 92
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: Can't connect to DB (Mageia system)

Post by blm-ubunet » Tue Oct 08, 2019 7:13 am

You've posted a mythbackend log.. did you mean to post the mythtv-setup log??

If you run mythtv-setup as user "anders" it will use a different config.xml file to backend.
Mythbackend typically runs as user "mythtv" & this is often NOT the frontend or normal user.

Your backend is trying to use config.xml from /var/lib/mythtv/ because there is no home folder for user "mythtv".
Just make the 2 config.xml in /home/anders/.mythtv/ & /var/lib/mythtv/ the same.

I used to symlink one to the other in the past (14.04), not sure that is still doable.

anp66
Newcomer
Posts: 7
Joined: Tue Oct 08, 2019 6:22 am
Denmark

Re: Can't connect to DB (Mageia system)

Post by anp66 » Tue Oct 08, 2019 7:59 am

Thanks for your reply blm-unbunet!

The config file in /var/lib/mythtv/config.xml looks real, but for security reasons it was copied:

Code: Select all

[anders@localhost mythtv] $ cp /var/lib/mythtv/config.xml /home/anders/.mythtv/config.xml
cp: overwrite '/home/anders/.mythtv/config.xml'? y
Unfortunately, it still can't connect to db, but now the files are similar :-).

Is there a log file for mythtv setup?

Here's the screen dump of what's happening:

Code: Select all

anders@localhost mythtv]$ mythtv-setup 
2019-10-08 09:27:51.806948 I  Setup Interrupt handler
2019-10-08 09:27:51.806959 I  Setup Terminated handler
2019-10-08 09:27:51.806962 I  Setup Segmentation fault handler
2019-10-08 09:27:51.806966 I  Setup Aborted handler
2019-10-08 09:27:51.806969 I  Setup Bus error handler
2019-10-08 09:27:51.806972 I  Setup Floating point exception handler
2019-10-08 09:27:51.806975 I  Setup Illegal instruction handler
2019-10-08 09:27:51.806979 I  Setup Real-time signal 0 handler
2019-10-08 09:27:51.806983 I  Setup Hangup handler
2019-10-08 09:27:51.807032 C  mythtv-setup version: fixes/30.0 [30.0-20190121.1.mga6.tainted (aka v30.0-3-g44fee)]
2019-10-08 09:27:51.807045 C  Qt version: compile: 5.9.4, runtime: 5.9.4
2019-10-08 09:27:51.807047 N  Enabled verbose msgs:  general
2019-10-08 09:27:51.807054 N  Setting Log Level to LOG_INFO
2019-10-08 09:27:51.817399 I  Added logging to the console
2019-10-08 09:27:51.969170 N  Using runtime prefix = /usr
2019-10-08 09:27:51.969173 N  Using configuration directory = /home/anders/.mythtv
2019-10-08 09:27:51.969213 I  Assumed character encoding: en_DK.UTF-8
2019-10-08 09:27:51.969301 I  Loading en_us translation for module mythfrontend
2019-10-08 09:27:51.969482 I  Empty LocalHostName. This is typical.
2019-10-08 09:27:51.969485 I  Using a profile name of: 'localhost' (Usually the same as this host's name.)
2019-10-08 09:27:51.969506 I  Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
2019-10-08 09:27:52.971216 I  Start up testing connections. DB localhost, BE , attempt 1, status dbAwake, Delay: 2000
2019-10-08 09:27:57.974803 I  Start up testing connections. DB localhost, BE , attempt 2, status dbAwake, Delay: 2000
2019-10-08 09:27:57.977021 I  ScreenSaverDBus: Created for DBus service: org.freedesktop.ScreenSaver
2019-10-08 09:27:57.979031 I  ScreenSaverDBus: Created for DBus service: org.gnome.SessionManager
2019-10-08 09:27:57.979224 I  Starting process manager
2019-10-08 09:27:57.979239 I  Starting process signal handler
2019-10-08 09:27:57.980153 I  Starting IO manager (write)
2019-10-08 09:27:57.980352 I  Starting IO manager (read)
: cannot open shared object file: No such file or directory
2019-10-08 09:27:58.029973 I  ScreenSaverX11Private: DPMS is active.
2019-10-08 09:27:58.044949 N  Desktop video mode: 1920x1080 60.000 Hz
2019-10-08 09:27:58.120966 E  DB Error (StorageGroup::StorageGroup()):
Query was:

Driver error was [1/]:
Driver not loaded
Database error was:
Driver not loaded

2019-10-08 09:27:58.121386 E  LIRC: Failed to connect to Unix socket '/var/run/lirc/lircd'
			eno: No such file or directory (2)
2019-10-08 09:27:58.121397 I  No joystick configuration found, not enabling joystick control
2019-10-08 09:27:58.121497 E  CECAdapter: Failed to load libcec.
2019-10-08 09:27:58.121507 I  UDPListener: Enabling
2019-10-08 09:27:58.121626 I  Binding to UDP 0.0.0.0:0
2019-10-08 09:27:58.121651 I  Binding to UDP [::]:0
2019-10-08 09:27:58.132117 I  Using Frameless Window
2019-10-08 09:27:58.132119 I  Using Full Screen Window
2019-10-08 09:27:58.141267 I  UI Screen Resolution: 1920 x 1080
2019-10-08 09:27:58.153843 W  OpenGL: Could not determine whether Sync to VBlank is enabled.
2019-10-08 09:27:58.299825 I  Trying the OpenGL 2.0 render
2019-10-08 09:27:58.299877 I  OpenGL painter using existing OpenGL context.
2019-10-08 09:27:58.402957 I  OpenGL2: GLSL supported
2019-10-08 09:27:58.402999 I  OpenGL: OpenGL vendor  : NVIDIA Corporation
2019-10-08 09:27:58.403001 I  OpenGL: OpenGL renderer: GeForce GTX 1050/PCIe/SSE2
2019-10-08 09:27:58.403002 I  OpenGL: OpenGL version : 4.6.0 NVIDIA 390.129
2019-10-08 09:27:58.403005 I  OpenGL: Max texture size: 32768 x 32768
2019-10-08 09:27:58.403006 I  OpenGL: Max texture units: 4
2019-10-08 09:27:58.403008 I  OpenGL: Direct rendering: Yes
2019-10-08 09:27:58.403012 I  OpenGL: Extensions Supported: 3e3b
2019-10-08 09:27:58.403013 I  OpenGL: PixelBufferObject support available
2019-10-08 09:27:58.403960 I  OpenGL: Initialised MythRenderOpenGL
2019-10-08 09:27:58.406575 I  MythUIHelper: Pruning cache directory: /home/anders/.mythtv/cache/remotecache
2019-10-08 09:27:58.406599 I  MythUIHelper: Kept 0 files, deleted 0 files, stat error on 0 files
2019-10-08 09:27:58.406601 I  MythUIHelper: Pruning cache directory: /home/anders/.mythtv/cache/thumbnails
2019-10-08 09:27:58.406613 I  MythUIHelper: Kept 0 files, deleted 0 files, stat error on 0 files
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
2019-10-08 09:27:58.609632 I  MythUIWebBrowser: Loading css from - file:///usr/share/mythtv/themes/default/htmls/mythbrowser.css
2019-10-08 09:27:58.611365 I  MythUIWebBrowser: enabling plugins
2019-10-08 09:28:07.582987 I  Start up failure. host localhost, status dbAwakeFail
2019-10-08 09:28:07.583004 E  Failed to init MythContext, exiting.
2019-10-08 09:28:07.585176 I  OpenGL2: Deleting OpenGL Resources
2019-10-08 09:28:07.585224 I  OpenGL: Deleting OpenGL Resources
Here is additional information about the service:

Code: Select all

[root@localhost mythtv]# service mysqld status
Redirecting to /bin/systemctl status mysqld.service
● mysqld.service - MySQL database server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-10-08 08:13:56 CEST; 1h 33min ago
  Process: 2339 ExecStartPre=/usr/sbin/mysqld-prepare-db-dir (code=exited, status=0/SUCCESS)
 Main PID: 2354 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mysqld.service
           └─2354 /usr/sbin/mysqld

Oct 08 08:13:56 localhost mysqld[2354]: 2019-10-08  8:13:56 140300938901248 [Note] InnoDB: Dumping buffer pool(s) not yet started
Oct 08 08:13:56 localhost mysqld[2354]: 2019-10-08  8:13:56 140301557907392 [Warning] mysqld: GSSAPI plugin : default principal 'mariadb/localhost.localdomain@' not found in keytab
Oct 08 08:13:56 localhost mysqld[2354]: 2019-10-08  8:13:56 140301557907392 [ERROR] mysqld: Server GSSAPI error (major 851968, minor 2529639093) : gss_acquire_cred failed -Unspecified GSS failure.  Minor code ma
Oct 08 08:13:56 localhost mysqld[2354]: 2019-10-08  8:13:56 140301557907392 [ERROR] Plugin 'gssapi' init function returned error.
Oct 08 08:13:56 localhost mysqld[2354]: 191008  8:13:56 server_audit: MariaDB Audit Plugin version 1.4.7 STARTED.
Oct 08 08:13:56 localhost mysqld[2354]: 2019-10-08  8:13:56 140301557907392 [Note] /usr/sbin/mysqld: ready for connections.
Oct 08 08:13:56 localhost mysqld[2354]: Version: '10.1.41-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 0  Mageia MariaDB Server
Oct 08 08:13:56 localhost systemd[1]: Started MySQL database server.
Best regards
Anders

blm-ubunet
Junior
Posts: 92
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: Can't connect to DB (Mageia system)

Post by blm-ubunet » Tue Oct 08, 2019 8:47 am

Were you using mariadb before the upgrade?
Driver error sounds like mythtv db driver is missing/broken.
Is this package installed?
libqt5sql5-mysql

anp66
Newcomer
Posts: 7
Joined: Tue Oct 08, 2019 6:22 am
Denmark

Re: Can't connect to DB (Mageia system)

Post by anp66 » Tue Oct 08, 2019 2:20 pm

Yes mariadb was installed before upgrade.
libqt5sql5-mysql is not installed, and I can't choose it.

I think mariadb is running (see the status for service mysqld above).

I must back on track :-).
The closest I get to an error message is this: "Start up failure. Host localhost, status dbAwakeFail"
Are there logs I can examine ?

Best regards
Anders

blm-ubunet
Junior
Posts: 92
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: Can't connect to DB (Mageia system)

Post by blm-ubunet » Tue Oct 08, 2019 6:22 pm

The service mysql/mariadb server may be running but the logs show:
Driver error was [1/]:
Driver not loaded
Database error was:
Driver not loaded

I'm fairly sure that Mythtv core uses Qt mysql drivers & uses python-mysql for lots of scripts.

Can you downgrade mariadb to previous version? or change to mysql?

User avatar
bill6502
Developer
Posts: 1377
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Can't connect to DB (Mageia system)

Post by bill6502 » Tue Oct 08, 2019 6:45 pm

Anders,

Take a look at this one, note the initial post in the thread has the same symptom.

viewtopic.php?f=36&t=2957&p=14245&hilit ... ql#p14334
If your OS uses pacman, then I believe this will show if the driver is available:

Code: Select all

pacman --query --list qt5-base | grep libqsqlmysql
qt5-base /usr/lib/qt/plugins/sqldrivers/libqsqlmysql.so

anp66
Newcomer
Posts: 7
Joined: Tue Oct 08, 2019 6:22 am
Denmark

Re: Can't connect to DB (Mageia system)

Post by anp66 » Wed Oct 09, 2019 9:21 pm

Mageia is using rpm package manager.

Code: Select all

[root@localhost .mythtv]# rpm -qa|grep -i mysql|sort
lib64qt5-database-plugin-mysql-5.9.4-1.2.mga6
perl-DBD-mysql-4.46.0-1.mga6
python-mysql-1.3.7-2.mga6
Can we use this for something, it is only possible to log in as localhost:

Code: Select all

[anders@localhost ~]$ mysql -h192.168.87.33 -umythtv -p mythconverg
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.87.33' (111 "Connection refused")

[anders@localhost ~]$ mysql -h127.0.0.1 -umythtv -p mythconverg
Enter password: 
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111 "Connection refused")

[anders@localhost ~]$ mysql -hlocalhost -umythtv -p mythconverg
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 12
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 [mythconverg]> exit
Bye

User avatar
bill6502
Developer
Posts: 1377
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Can't connect to DB (Mageia system)

Post by bill6502 » Wed Oct 09, 2019 9:39 pm

Our current Ansible tree says that for rpm qt5-qtbase-mysql is used. That may have changed
depending on your distribution (I don't have any Mageia.)

The last test, using --host=localhost is a good choice. Don't know why the 127 one fails. Plus
localhost matches your config.xml, if it hasn't changed: <Host>localhost</Host>

Assuming your MySQL configuration is in the same place as mine: grep --recursive bind.address /etc/mysql
may help. I prefer: bind-address=::, but that may be too open for you.

You <may> find clues in /var/log/mysql/error.log.

anp66
Newcomer
Posts: 7
Joined: Tue Oct 08, 2019 6:22 am
Denmark

Re: Can't connect to DB (Mageia system)

Post by anp66 » Wed Oct 16, 2019 5:19 pm

This is now really frustrating :-(.
I can't get the mythtv setup to connect to the database, but can't figure out why. People come (and I'm glad) with all sorts of guesses, but I miss a structured way to solve the problems one at a time.
I miss a log file that specifically tells me why there is no contact with the database.

The only way I can connect to the database is as follows (i.e. not with an ip address or 127.0.0.1):

Code: Select all

[anders@localhost ~]$ mysql -hlocalhost -umythtv -p???????? mythconverg
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 13
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 [mythconverg]>
I can also access the database when a backup is made and it provides the following 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
I've convinced myself that mythtv-setup should be able to run before it makes sense to look at why mythbackend won't start.
I also hope that mythbackend will run when the mythtv-setup works.

Below is the entire log that comes when running the mythtv-setup program:

Code: Select all

[anders@localhost ~]$ mythtv-setup --verbose database:debug,file:debug
2019-10-16 17:58:50.383751 I  Setup Interrupt handler
2019-10-16 17:58:50.383762 I  Setup Terminated handler
2019-10-16 17:58:50.383766 I  Setup Segmentation fault handler
2019-10-16 17:58:50.383769 I  Setup Aborted handler
2019-10-16 17:58:50.383772 I  Setup Bus error handler
2019-10-16 17:58:50.383775 I  Setup Floating point exception handler
2019-10-16 17:58:50.383778 I  Setup Illegal instruction handler
2019-10-16 17:58:50.383783 I  Setup Real-time signal 0 handler
2019-10-16 17:58:50.383787 I  Setup Hangup handler
2019-10-16 17:58:50.383851 C  mythtv-setup version: fixes/30.0 [30.0-20190121.1.mga6.tainted (aka v30.0-3-g44fee)] www.mythtv.org
2019-10-16 17:58:50.383854 C  Qt version: compile: 5.9.4, runtime: 5.9.4
2019-10-16 17:58:50.383855 N  Enabled verbose msgs:  general database file
2019-10-16 17:58:50.383862 N  Setting Log Level to LOG_INFO
2019-10-16 17:58:50.394188 I  Added logging to the console
2019-10-16 17:58:50.394359 D  New Logging Client: ID:  (#1)
2019-10-16 17:58:50.449268 N  Using runtime prefix = /usr
2019-10-16 17:58:50.449271 N  Using configuration directory = /home/anders/.mythtv
2019-10-16 17:58:50.449316 I  Assumed character encoding: en_DK.UTF-8
2019-10-16 17:58:50.449416 I  Loading en_us translation for module mythfrontend
2019-10-16 17:58:50.449582 I  Empty LocalHostName. This is typical.
2019-10-16 17:58:50.449585 I  Using a profile name of: 'localhost' (Usually the same as this host's name.)
2019-10-16 17:58:50.449589 I  Clearing Settings Cache.
2019-10-16 17:58:50.449608 I  Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
2019-10-16 17:58:51.451127 I  Start up testing connections. DB localhost, BE , attempt 1, status dbAwake, Delay: 2000
2019-10-16 17:58:56.454663 I  Start up testing connections. DB localhost, BE , attempt 2, status dbAwake, Delay: 2000
2019-10-16 17:58:56.456839 I  ScreenSaverDBus: Created for DBus service: org.freedesktop.ScreenSaver
2019-10-16 17:58:56.458626 I  ScreenSaverDBus: Created for DBus service: org.gnome.SessionManager
2019-10-16 17:58:56.458888 I  Starting process manager
2019-10-16 17:58:56.459907 I  Starting IO manager (read)
2019-10-16 17:58:56.459937 I  Starting process signal handler
2019-10-16 17:58:56.460013 I  Starting IO manager (write)
2019-10-16 17:58:56.510737 I  ScreenSaverX11Private: DPMS is active.
2019-10-16 17:58:56.522863 N  Desktop video mode: 1920x1080 60.000 Hz
libcec.so.4: cannot open shared object file: No such file or directory
2019-10-16 17:58:56.608882 I  Database object created: DBManager0
2019-10-16 17:58:56.608889 I  New DB connection, total: 1
2019-10-16 17:58:56.608924 E  DB Error (StorageGroup::StorageGroup()):
Query was:

Driver error was [1/]:
Driver not loaded
Database error was:
Driver not loaded

2019-10-16 17:58:56.609305 E  LIRC: Failed to connect to Unix socket '/var/run/lirc/lircd'
			eno: No such file or directory (2)
2019-10-16 17:58:56.609316 I  No joystick configuration found, not enabling joystick control
2019-10-16 17:58:56.609403 E  CECAdapter: Failed to load libcec.
2019-10-16 17:58:56.609429 I  UDPListener: Enabling
2019-10-16 17:58:56.609506 I  Binding to UDP 0.0.0.0:0
2019-10-16 17:58:56.609543 I  Binding to UDP [::]:0
2019-10-16 17:58:56.619998 I  Using Frameless Window
2019-10-16 17:58:56.620000 I  Using Full Screen Window
2019-10-16 17:58:56.630068 I  UI Screen Resolution: 1920 x 1080
2019-10-16 17:58:56.634471 W  OpenGL: Could not determine whether Sync to VBlank is enabled.
2019-10-16 17:58:56.726201 I  Trying the OpenGL 2.0 render
2019-10-16 17:58:56.726249 I  OpenGL painter using existing OpenGL context.
2019-10-16 17:58:56.837971 I  OpenGL2: GLSL supported
2019-10-16 17:58:56.838012 I  OpenGL: OpenGL vendor  : NVIDIA Corporation
2019-10-16 17:58:56.838015 I  OpenGL: OpenGL renderer: GeForce GTX 1050/PCIe/SSE2
2019-10-16 17:58:56.838016 I  OpenGL: OpenGL version : 4.6.0 NVIDIA 390.129
2019-10-16 17:58:56.838019 I  OpenGL: Max texture size: 32768 x 32768
2019-10-16 17:58:56.838020 I  OpenGL: Max texture units: 4
2019-10-16 17:58:56.838022 I  OpenGL: Direct rendering: Yes
2019-10-16 17:58:56.838025 I  OpenGL: Extensions Supported: 3e3b
2019-10-16 17:58:56.838026 I  OpenGL: PixelBufferObject support available
2019-10-16 17:58:56.839674 I  OpenGL: Initialised MythRenderOpenGL
2019-10-16 17:58:56.842923 I  MythUIHelper: Pruning cache directory: /home/anders/.mythtv/cache/remotecache
2019-10-16 17:58:56.842947 I  MythUIHelper: Kept 0 files, deleted 0 files, stat error on 0 files
2019-10-16 17:58:56.842949 I  MythUIHelper: Pruning cache directory: /home/anders/.mythtv/cache/thumbnails
2019-10-16 17:58:56.842961 I  MythUIHelper: Kept 0 files, deleted 0 files, stat error on 0 files
2019-10-16 17:58:56.842981 D  MythFontManager: Scanning directory '/usr/share/mythtv/fonts/' for font files.
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
2019-10-16 17:58:56.943130 D  MythFontManager: Scanning directory '/usr/share/mythtv/themes/MythCenter/' for font files.
2019-10-16 17:58:56.943256 D  MythFontManager: Scanning directory '/usr/share/mythtv/themes/MythCenter/htmls' for font files.
2019-10-16 17:58:56.943294 D  MythFontManager: Scanning directory '/usr/share/mythtv/themes/MythCenter/osd' for font files.
2019-10-16 17:58:56.943396 D  MythFontManager: Scanning directory '/usr/share/mythtv/themes/MythCenter/title' for font files.
2019-10-16 17:58:56.943504 D  MythFontManager: Scanning directory '/usr/share/mythtv/themes/MythCenter/ui' for font files.
2019-10-16 17:58:56.943595 D  MythFontManager: Scanning directory '/usr/share/mythtv/themes/MythCenter/watermark' for font files.
2019-10-16 17:58:57.031994 D  DownloadManager: items downloading 0
2019-10-16 17:58:57.031997 D  DownloadManager: items queued 0
2019-10-16 17:58:57.031999 D  DownloadManager: waiting for more items to download
2019-10-16 17:58:57.046070 I  MythUIWebBrowser: Loading css from - file:///usr/share/mythtv/themes/default/htmls/mythbrowser.css
2019-10-16 17:58:57.048629 I  MythUIWebBrowser: enabling plugins
2019-10-16 17:58:57.087488 E  XMLParseBase: No theme file /usr/share/mythtv/themes/MythCenter/config-ui.xml
2019-10-16 17:59:02.151863 I  Start up testing connections. DB localhost, BE , attempt 3, status dbAwake, Delay: 2000
2019-10-16 17:59:07.161684 I  Start up testing connections. DB localhost, BE , attempt 4, status dbAwake, Delay: 2000
2019-10-16 17:59:12.168603 I  Start up testing connections. DB localhost, BE , attempt 5, status dbAwake, Delay: 2000
2019-10-16 17:59:17.175436 I  Start up testing connections. DB localhost, BE , attempt 6, status dbAwake, Delay: 2000
2019-10-16 17:59:22.182392 I  Start up testing connections. DB localhost, BE , attempt 7, status dbAwake, Delay: 2000
2019-10-16 17:59:27.189287 I  Start up testing connections. DB localhost, BE , attempt 8, status dbAwake, Delay: 2000
2019-10-16 17:59:32.203087 I  Start up testing connections. DB localhost, BE , attempt 9, status dbAwake, Delay: 2000
2019-10-16 17:59:37.209923 I  Start up testing connections. DB localhost, BE , attempt 10, status dbAwake, Delay: 2000
2019-10-16 17:59:42.216861 I  Start up failure. host localhost, status dbAwakeFail
2019-10-16 17:59:51.547825 E  Failed to init MythContext, exiting.    <---- Here I stop mythtv-setup with the exit button.
Here are my questions for the log.

This is the config folder ?:

Code: Select all

2019-10-16 17:58:50.449271 N  Using configuration directory = /home/anders/.mythtv
Here is the config folder with the config file:

Code: Select all

[anders@localhost .mythtv]$ ls -alrt
total 80
drwxr-xr-x  2 anders anders  4096 Oct 20  2017 MythBrowser/
drwxr-xr-x  2 anders anders  4096 Nov  4  2017 channels/
drwxr-xr-x  2 anders anders  4096 Nov  4  2017 3rdParty/
drwxr-xr-x  3 anders anders  4096 Nov  4  2017 tmp/
drwxr-xr-x  2 anders anders  4096 Nov  4  2017 themes/
drwxr-xr-x  2 anders anders  4096 Nov  4  2017 HardwareProfile/
drwxr-xr-x 10 anders anders  4096 Oct  6 12:44 cache/
-rw-r--r--  1 anders anders    41 Oct  8 08:50 backuprc
drwxr-xr-x  9 anders anders  4096 Oct  8 08:50 ./
-rw-r--r--  1 anders anders   554 Oct  8 11:03 config.xml
drwxrwxr-x 48 anders anders 36864 Oct 15 23:10 ../
[anders@localhost .mythtv]$ cat 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>
</Configuration>
(Incidentally the same config file that is located /var/lib/mythtv/, used by mythbackend)

Does the following mean that no backend (BE) is defined ?

Code: Select all

2019-10-16 17:58:50.449608 I  Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
Is there a database connection at this time?

Code: Select all

2019-10-16 17:58:56.608882 I  Database object created: DBManager0
2019-10-16 17:58:56.608889 I  New DB connection, total: 1
This error is probably not because there is something wrong with my storage group definition, but because there is no connection to the database ?

Code: Select all

2019-10-16 17:58:56.608924 E  DB Error (StorageGroup::StorageGroup()):
Query was:

Driver error was [1/]:
Driver not loaded
Database error was:
Driver not loaded
This is how storage group is defined in db

Code: Select all

MariaDB [mythconverg]> SELECT * FROM storagegroup;
+----+-------------+-----------+--------------------------------+
| id | groupname   | hostname  | dirname                        |
+----+-------------+-----------+--------------------------------+
|  1 | Default     | localhost | /home/anders/Videos/Recording/ |
|  2 | Videos      | localhost | /home/anders/Videos/           |
|  3 | Fanart      | localhost | /home/anders/Videos/Picture/   |
|  4 | Coverart    | localhost | /home/anders/Videos/Picture/   |
|  5 | Screenshots | localhost | /home/anders/Videos/Picture/   |
|  6 | Banners     | localhost | /home/anders/Videos/Picture/   |
|  7 | Photographs | localhost | /home/anders/Videos/Picture/   |
+----+-------------+-----------+--------------------------------+
7 rows in set (0.00 sec)
Here are some values from settings. Can see that it is a mess, could it be the reason for the lack of db connection from mythtv ?

Code: Select all

MariaDB [mythconverg]> SELECT * FROM settings WHERE value IN ('MasterServerName', 'MasterServerIP', 'BackendServerIP', 'BackendServerIP6'); 
+------------------+---------------+-----------+
| value            | data          | hostname  |
+------------------+---------------+-----------+
| BackendServerIP  | 192.168.1.15  | 127.0.0.1 |
| BackendServerIP  | 127.0.0.1     | localhost |
| BackendServerIP6 | ::1           | 127.0.0.1 |
| BackendServerIP6 | ::1           | localhost |
| MasterServerIP   | 192.168.87.33 | NULL      |
+------------------+---------------+-----------+
5 rows in set (0.01 sec)
I only have 1 mythtv backend and 1 mythtv frontend and they run on the same machine.

This is the hosts file:

Code: Select all

[anders@localhost etc]$ cat hosts
127.0.0.1 localhost.localdomain localhost
::1         localhost
And here's the awesome mistake! :

Code: Select all

2019-10-16 17:59:42.216861 I  Start up failure. host localhost, status dbAwakeFail
From the above, I can't figure out if I missed to define a backend (BE) ?.
Something is missing which means that mythtv cannot connect to the database ?.
Is there anything wrong with the mythtv setup in the database ?
Port 3306 against the database is not open (works, as said, in backup script.) ?.

My firewall is shut down to avoid problems.
Below is port info:

Code: Select all

[anders@localhost ~]$ nmap -p3306 --reason localhost

Starting Nmap 7.40 ( https://nmap.org ) at 2019-10-16 18:57 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up, received conn-refused (0.000044s latency).
Other addresses for localhost (not scanned): ::1
rDNS record for 127.0.0.1: localhost.localdomain
PORT     STATE  SERVICE REASON
3306/tcp closed mysql   conn-refused

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds

 
[anders@localhost ~]$ netstat --tcp

Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 linux.local:39216       arn09s20-in-f14.1:https ESTABLISHED
tcp        0      0 linux.local:32976       lt-in-f189.1e100.:https ESTABLISHED
tcp        0      0 linux.local:59894       lh-in-f189.1e100.:https ESTABLISHED
tcp        0      0 linux.local:936         192.168.87.35:nfs       ESTABLISHED
tcp        0      0 linux.local:37784       arn11s04-in-f14.1:https ESTABLISHED


[anders@localhost ~]$ netstat -alnp | grep 3306

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
unix  3      [ ]         STREAM     CONNECTED     33064    3760/gsd-keyboard    
unix  3      [ ]         STREAM     CONNECTED     33061    -                    @/tmp/.X11-unix/X1
unix  3      [ ]         STREAM     CONNECTED     33060    3760/gsd-keyboard    
unix  3      [ ]         STREAM     CONNECTED     33063    3758/gsd-housekeepi  
unix  3      [ ]         STREAM     CONNECTED     33066    3525/dbus-daemon     @/tmp/dbus-IbcCKl6GdJ

User avatar
bill6502
Developer
Posts: 1377
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Can't connect to DB (Mageia system)

Post by bill6502 » Wed Oct 16, 2019 6:39 pm

Agreed/sorry about the frustrating part. As to structure, you've done the normal (ping, nmap, mysql --host... .)

Note that MasterServerName is missing from the SELECT above. Problem is that it gets set in
mythtv-setup or when the DB is upgraded from a lower schema. I can't recall anyone using
localhost there, but I believe it's valid (I don't use it and haven't tried as my box is accessible
to my whole network.)

Another thing, didn't see the output of: grep --recursive bind.address /etc/mysql output. Yours may be in /etc/my.cfg
or perhaps my.cfg.d.

Wondering if your host is preferring IPv6 over IPv4.

nmap -p3306 -6 --reason localhost as something allows your mysql... test to work. Try nmap -p3306 -4 --reason localhost
and expect it to fail.

anp66
Newcomer
Posts: 7
Joined: Tue Oct 08, 2019 6:22 am
Denmark

Re: Can't connect to DB (Mageia system)

Post by anp66 » Wed Oct 16, 2019 8:22 pm

Hi Bill6502
Thanks for your prompt reply !


Regarding MasterServerName, should I insert a line in db myself ?
If YES, what values should I use for MasterServerName ?

Here is the result with regard to bind address.
First, all cnf files:

Code: Select all

[root@localhost /]# find . -name *.cnf -print
./usr/share/mysql/wsrep.cnf
./usr/share/mysql/my-huge.cnf
./usr/share/mysql/my-medium.cnf
./usr/share/mysql/my-innodb-heavy-4G.cnf
./usr/share/mysql/my-small.cnf
./usr/share/mysql/my-large.cnf
./home/anders/.local/share/Trash/files/usr/bin/openssl.cnf
./home/anders/usr/bin/openssl.cnf
./etc/my.cnf
./etc/pki/tls/openssl.cnf
./etc/my.cnf.d/mysql-clients.cnf
./etc/my.cnf.d/server_audit.cnf
./etc/my.cnf.d/query_cache_info.cnf
./etc/my.cnf.d/metadata_lock_info.cnf
./etc/my.cnf.d/ha_federatedx.cnf
./etc/my.cnf.d/auth_socket.cnf
./etc/my.cnf.d/query_response_time.cnf
./etc/my.cnf.d/semisync_master.cnf
./etc/my.cnf.d/auth_pam.cnf
./etc/my.cnf.d/auth_gssapi.cnf
./etc/my.cnf.d/client.cnf
./etc/my.cnf.d/server.cnf
./etc/my.cnf.d/handlersocket.cnf
./etc/my.cnf.d/disks.cnf
./etc/my.cnf.d/ha_blackhole.cnf
./etc/my.cnf.d/locales.cnf
./etc/my.cnf.d/sql_errlog.cnf
./etc/my.cnf.d/feedback.cnf
./etc/my.cnf.d/semisync_slave.cnf
./etc/my.cnf.d/ha_archive.cnf
./etc/my.cnf.d/cracklib_password_check.cnf
So the cnf files that have something to do with mythtv:

Code: Select all

/etc
[anders@localhost etc]$ ls -l *.cnf
-rw-r--r-- 1 root root 5396 Oct 13 15:03 my.cnf
[anders@localhost etc]$ grep --recursive bind.address *.cnf
#bind-address=192.168.100.1
bind-address=localhost

/etc/my.cnf.d
[anders@localhost my.cnf.d]$ grep --recursive bind.address *.cnf
server.cnf:#bind-address=0.0.0.0
server.cnf:bind-address=localhost

[anders@localhost my.cnf.d]$ ls -l server.cnf
-rw-r--r-- 1 root root 1103 Oct 13 15:02 server.cnf
Here are the outputs for the nmap commands:

Code: Select all

[anders@localhost ~]$ nmap -p3306 -6 --reason localhost

Starting Nmap 7.40 ( https://nmap.org ) at 2019-10-16 21:58 CEST
Nmap scan report for localhost (::1)
Host is up, received conn-refused (0.000065s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT     STATE  SERVICE REASON
3306/tcp closed mysql   conn-refused

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds

Code: Select all

[anders@localhost ~]$ nmap -p3306 -4 --reason localhost

Starting Nmap 7.40 ( https://nmap.org ) at 2019-10-16 22:00 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up, received conn-refused (0.000046s latency).
Other addresses for localhost (not scanned): ::1
rDNS record for 127.0.0.1: localhost.localdomain
PORT     STATE  SERVICE REASON
3306/tcp closed mysql   conn-refused

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds
In both cases, the tcp port is closed with cause: conn-refused
I've tried to "google" conn-refused, but can't find any answer to use.

blm-ubunet
Junior
Posts: 92
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: Can't connect to DB (Mageia system)

Post by blm-ubunet » Wed Oct 16, 2019 9:27 pm

AFAIK
If this is a combined FE & BE with this BE being the master then

Code: Select all

BackendServerIP   | 192.168.1.15   | 127.0.0.1 |
BackendServerIP   | 127.0.0.1        | localhost  |
BackendServerIP6    | ::1               | 127.0.0.1 |
BackendServerIP6    | ::1               | localhost  |
MasterServerIP     | 192.168.87.33 | NULL        |
Shouldn't MasterServerIP == BackendServerIP ?

and if you have no remote FEs or slave BEs then this can be 127.0.0.1

<Edit>
In an old trial MythTV build/setup..
I have a "MasterServerName" set as well.
And I have NO IP addresses listed in the hostname column, only NULL & actual computer hostname </edit>
Last edited by blm-ubunet on Thu Oct 17, 2019 2:33 am, edited 1 time in total.

User avatar
bill6502
Developer
Posts: 1377
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Can't connect to DB (Mageia system)

Post by bill6502 » Thu Oct 17, 2019 1:38 am

@blm-ubunet, good catch,yes the Master should match the Backend, but he's not getting that far.
Can't even connect to the DB to read it. MasterServerName now defines the Master/
Slave role.

@anp66, hold off on setting the MasterServerName manually.

@anp66, your netstat command is OK, but may need to be run with sudo (I don't need sudo.)
If port 3306 isn't there, that's a problem. If sudo doesn't help (you still don't see 3306, that
suggests that MariaDB isn't running.) That makes no sense if the mysql --hostname... command
line test still works.

Try this (so we can verify that the mysql port is really 3306: ss -n -o 'sport = :mysql'

https://mariadb.com/kb/en/library/serve ... nd_address describes how the bind-address
works. Unlike MySQL, the page doesn't say if IPv4 is preferred if it's defined in /etc/hosts when IPv6 is.
You could TEMPORARILY comment out the IPv6 address. Restart MariaDB if you change it and re-test
mythtv-setup.

anp66
Newcomer
Posts: 7
Joined: Tue Oct 08, 2019 6:22 am
Denmark

Re: Can't connect to DB (Mageia system)

Post by anp66 » Thu Oct 17, 2019 3:58 am

@blm-ubunet
Thanks for your reply !.
At one point I got google mess network, therefore ip address changed.
I will remember your comments when connecting to db again.

@bill6502
Again thanks for your reply, it is appreciated !

Below is the result when nmap is run as root. The gate is still closed, but the reason has been changed to 'reset ttl 64' :

Code: Select all

[root@localhost anders]# nmap -p3306 -4 --reason localhost

Starting Nmap 7.40 ( https://nmap.org ) at 2019-10-17 05:14 CEST
Nmap scan report for localhost (127.0.0.1)
Host is up, received localhost-response (0.000038s latency).
Other addresses for localhost (not scanned): ::1
rDNS record for 127.0.0.1: localhost.localdomain
PORT     STATE  SERVICE REASON
3306/tcp closed mysql   reset ttl 64

Nmap done: 1 IP address (1 host up) scanned in 0.25 seconds

Code: Select all

[root@localhost anders]# nmap -p3306 -6 --reason localhost

Starting Nmap 7.40 ( https://nmap.org ) at 2019-10-17 05:14 CEST
Nmap scan report for localhost (::1)
Host is up, received localhost-response (0.000058s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT     STATE  SERVICE REASON
3306/tcp closed mysql   reset ttl 64

Nmap done: 1 IP address (1 host up) scanned in 0.25 seconds
Below is the result of the ss command. There is no difference whether the command is run as a regular user or root:

Code: Select all

[anders@localhost ~]$ ss -n -o 'sport = :mysql'
Netid State      Recv-Q Send-Q                                                          Local Address:Port                                                                         Peer Address:Port              

Code: Select all

[root@localhost anders]# ss -n -o 'sport = :mysql'
Netid State      Recv-Q Send-Q                                                          Local Address:Port                                                                         Peer Address:Port          
Interesting document about server system variables THANKS.
However, I do not understand where I need to (TEMPORARILY) comment out the IPv6 address ?

Post Reply