[SOLVED] Mysql errors on new mythbuntu 16.04 setup

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
axel77
Newcomer
Posts: 8
Joined: Mon Jan 30, 2017 5:35 am
United States of America

[SOLVED] Mysql errors on new mythbuntu 16.04 setup

Post by axel77 »

I installed mythbuntu 16.04 last week and have just got around to setting up my server as a master backend. I followed the Mythtv Backend Setup wiki and successfully setup both HDHomerun capture streams and channel lists. However I have yet to actually get mythtv up and running due to mysql issues.

Unfortunatley I am a complete novice when dealing with mysql. I definitely missed a step somewhere and am having a terrible time trying to fix my blunder. Any ideas?

config.xml (same in both /home and /etc/mythtv)

Code: Select all

<Configuration>
  <Database>
    <PingHost>1</PingHost>
    <Host>localhost</Host>
    <UserName>mythtv</UserName>
    <Password>1qXilKkR</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>
/mythweb -- error string: !!NoTrans: No such file or directory [#2002]

Code: Select all

    datetime:  2017-01-31 21:05:24 (CST)
    errornum:  256
  error type:  User Error
error string:  !!NoTrans: No such file or directory [#2002]

Backtrace
Array
(
    [0] => Array
        (
            [file] => /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php
            [line] => 65
            [function] => error
            [class] => Database
            [object] => Database_mysqlicompat Object
                (
                    [dbh] => 
                    [error] => No such file or directory [#2002]
                    [err] => No such file or directory
                    [errno] => 2002
                    [last_sh] => Database_Query_mysqlicompat Object
                        (
                            [dbh] => 
                            [query] => Array
                                (
                                    [0] => SET SESSION sql_mode = "";
                                )

                            [last_query] => SET SESSION sql_mode = "";
                            [warnings] => Array ( )
                            [num_args_needed] => 0
                            [num_rows] => 
                            [affected_rows] => 
                            [insert_id] => 
                            [db] => Database_mysqlicompat Object
 *RECURSION*
                        )

                    [fatal_errors] => 1
                    [query_count] => 0
                    [query_time] => 0
                    [global_name] => 
                    [destruct_handlers] => Array ( )
                )

            [type] => ->
            [args] => Array ( )
        )

    [1] => Array
        (
            [file] => /usr/share/mythtv/mythweb/classes/Database.php
            [line] => 263
            [function] => execute
            [class] => Database_Query_mysqlicompat
            [object] => Database_Query_mysqlicompat Object
                (
                    [dbh] => 
                    [query] => Array
                        (
                            [0] => SET SESSION sql_mode = "";
                        )

                    [last_query] => SET SESSION sql_mode = "";
                    [warnings] => Array ( )
                    [num_args_needed] => 0
                    [num_rows] => 
                    [affected_rows] => 
                    [insert_id] => 
                    [db] => Database_mysqlicompat Object
                        (
                            [dbh] => 
                            [error] => No such file or directory [#2002]
                            [err] => No such file or directory
                            [errno] => 2002
                            [last_sh] => Database_Query_mysqlicompat Object
 *RECURSION*
                            [fatal_errors] => 1
                            [query_count] => 0
                            [query_time] => 0
                            [global_name] => 
                            [destruct_handlers] => Array ( )
                        )

                )

            [type] => ->
            [args] => Array
                (
                    [0] => Array ( )
                )

        )

    [2] => Array
        (
            [file] => /usr/share/mythtv/mythweb/classes/Database.php
            [line] => 124
            [function] => query
            [class] => Database
            [object] => Database_mysqlicompat Object
                (
                    [dbh] => 
                    [error] => No such file or directory [#2002]
                    [err] => No such file or directory
                    [errno] => 2002
                    [last_sh] => Database_Query_mysqlicompat Object
                        (
                            [dbh] => 
                            [query] => Array
                                (
                                    [0] => SET SESSION sql_mode = "";
                                )

                            [last_query] => SET SESSION sql_mode = "";
                            [warnings] => Array ( )
                            [num_args_needed] => 0
                            [num_rows] => 
                            [affected_rows] => 
                            [insert_id] => 
                            [db] => Database_mysqlicompat Object
 *RECURSION*
                        )

                    [fatal_errors] => 1
                    [query_count] => 0
                    [query_time] => 0
                    [global_name] => 
                    [destruct_handlers] => Array ( )
                )

            [type] => ->
            [args] => Array
                (
                    [0] => SET SESSION sql_mode = "";
                )

        )

    [3] => Array
        (
            [file] => /usr/share/mythtv/mythweb/includes/database.php
            [line] => 44
            [function] => connect
            [class] => Database
            [type] => ::
            [args] => Array
                (
                    [0] => mythconverg
                    [1] => mythtv
                    [2] => 1qXilKkR
                    [3] => localhost
                    [4] => 
                    [5] => mysqlicompat
                )

        )

    [4] => Array
        (
            [file] => /usr/share/mythtv/mythweb/includes/init.php
            [line] => 43
            [args] => Array
                (
                    [0] => /usr/share/mythtv/mythweb/includes/database.php
                )

            [function] => require_once
        )

    [5] => Array
        (
            [file] => /usr/share/mythtv/mythweb/mythweb.php
            [line] => 20
            [args] => Array
                (
                    [0] => /usr/share/mythtv/mythweb/includes/init.php
                )

            [function] => require_once
        )

)
!!
    filename:  /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php
  error line:  66

==========================================================================

Backtrace: 

    file:  /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php
    line:  66
   class:  
function:  trigger_error
    type:  
    args:  Array
(
    [0] => No such file or directory [#2002]

Backtrace
Array
(
    [0] => Array
        (
            [file] => /usr/share/mythtv/mythweb/classes/Database/Query/mysqlicompat.php
            [line] => 65
            [function] => error
            [class] => Database
            [object] => Database_mysqlicompat Object
                (
                    [dbh] => 
                    [error] => No such file or directory [#2002]
                    [err] => No such file or directory
                    [errno] => 2002
                    [last_sh] => Database_Query_mysqlicompat Object
                        (
                            [dbh] => 
                            [query] => Array
                                (
                                    [0] => SET SESSION sql_mode = "";
                                )

                            [last_query] => SET SESSION sql_mode = "";
                            [warnings] => Array ( )
                            [num_args_needed] => 0
                            [num_rows] => 
                            [affected_rows] => 
                            [insert_id] => 
                            [db] => Database_mysqlicompat Object
 *RECURSION*
                        )

                    [fatal_errors] => 1
                    [query_count] => 0
                    [query_time] => 0
                    [global_name] => 
                    [destruct_handlers] => Array ( )
                )

            [type] => ->
            [args] => Array ( )
        )

    [1] => Array
        (
            [file] => /usr/share/mythtv/mythweb/classes/Database.php
            [line] => 263
            [function] => execute
            [class] => Database_Query_mysqlicompat
            [object] => Database_Query_mysqlicompat Object
                (
                    [dbh] => 
                    [query] => Array
                        (
                            [0] => SET SESSION sql_mode = "";
                        )

                    [last_query] => SET SESSION sql_mode = "";
                    [warnings] => Array ( )
                    [num_args_needed] => 0
                    [num_rows] => 
                    [affected_rows] => 
                    [insert_id] => 
                    [db] => Database_mysqlicompat Object
                        (
                            [dbh] => 
                            [error] => No such file or directory [#2002]
                            [err] => No such file or directory
                            [errno] => 2002
                            [last_sh] => Database_Query_mysqlicompat Object
 *RECURSION*
                            [fatal_errors] => 1
                            [query_count] => 0
                            [query_time] => 0
                            [global_name] => 
                            [destruct_handlers] => Array ( )
                        )

                )

            [type] => ->
            [args] => Array
                (
                    [0] => Array ( )
                )

        )

    [2] => Array
        (
            [file] => /usr/share/mythtv/mythweb/classes/Database.php
            [line] => 124
            [function] => query
            [class] => Database
            [object] => Database_mysqlicompat Object
                (
                    [dbh] => 
                    [error] => No such file or directory [#2002]
                    [err] => No such file or directory
                    [errno] => 2002
                    [last_sh] => Database_Query_mysqlicompat Object
                        (
                            [dbh] => 
                            [query] => Array
                                (
                                    [0] => SET SESSION sql_mode = "";
                                )

                            [last_query] => SET SESSION sql_mode = "";
                            [warnings] => Array ( )
                            [num_args_needed] => 0
                            [num_rows] => 
                            [affected_rows] => 
                            [insert_id] => 
                            [db] => Database_mysqlicompat Object
 *RECURSION*
                        )

                    [fatal_errors] => 1
                    [query_count] => 0
                    [query_time] => 0
                    [global_name] => 
                    [destruct_handlers] => Array ( )
                )

            [type] => ->
            [args] => Array
                (
                    [0] => SET SESSION sql_mode = "";
                )

        )

    [3] => Array
        (
            [file] => /usr/share/mythtv/mythweb/includes/database.php
            [line] => 44
            [function] => connect
            [class] => Database
            [type] => ::
            [args] => Array
                (
                    [0] => mythconverg
                    [1] => mythtv
                    [2] => 1qXilKkR
                    [3] => localhost
                    [4] => 
                    [5] => mysqlicompat
                )

        )

    [4] => Array
        (
            [file] => /usr/share/mythtv/mythweb/includes/init.php
            [line] => 43
            [args] => Array
                (
                    [0] => /usr/share/mythtv/mythweb/includes/database.php
                )

            [function] => require_once
        )

    [5] => Array
        (
            [file] => /usr/share/mythtv/mythweb/mythweb.php
            [line] => 20
            [args] => Array
                (
                    [0] => /usr/share/mythtv/mythweb/includes/init.php
                )

            [function] => require_once
        )

)

    [1] => 256
)

    file:  /usr/share/mythtv/mythweb/classes/Database.php
    line:  263
   class:  Database_Query_mysqlicompat
function:  execute
    type:  ->
    args:  Array
(
    [0] => Array ( )
)

    file:  /usr/share/mythtv/mythweb/classes/Database.php
    line:  124
   class:  Database
function:  query
    type:  ->
    args:  Array
(
    [0] => SET SESSION sql_mode = "";
)

    file:  /usr/share/mythtv/mythweb/includes/database.php
    line:  44
   class:  Database
function:  connect
    type:  ::
    args:  Array
(
    [0] => mythconverg
    [1] => mythtv
    [2] => 1qXilKkR
    [3] => localhost
    [4] => 
    [5] => mysqlicompat
)

    file:  /usr/share/mythtv/mythweb/includes/init.php
    line:  43
   class:  
function:  require_once
    type:  
    args:  Array
(
    [0] => /usr/share/mythtv/mythweb/includes/database.php
)

    file:  /usr/share/mythtv/mythweb/mythweb.php
    line:  20
   class:  
function:  require_once
    type:  
    args:  Array
(
    [0] => /usr/share/mythtv/mythweb/includes/init.php
)


==========================================================================

$_SESSION: Array
(
    [language] => English
    [date_statusbar] => %a %b %e, %Y, %I:%M %p
    [date_scheduled] => %a %b %e, %Y (%I:%M %p)
    [date_scheduled_popup] => %a %b %e, %Y
    [date_recorded] => %a %b %e, %Y (%I:%M %p)
    [date_search] => %a %b %e, %Y, %I:%M %p
    [date_listing_key] => %a %b %e, %Y, %I:%M %p
    [date_listing_jump] => %a %b %e, %Y
    [date_channel_jump] => %a %b %e, %Y
    [date_job_status] => %a %b %e, %Y, %I:%M %p
    [time_format] => %I:%M %p
)

==========================================================================

$_SERVER: Array
(
    [REDIRECT_STATUS] => 200
    [db_server] => localhost
    [db_name] => mythconverg
    [db_login] => mythtv
    [db_password] => 1qXilKkR
    [HTTP_HOST] => 192.168.1.146
    [HTTP_CONNECTION] => keep-alive
    [HTTP_CACHE_CONTROL] => max-age=0
    [HTTP_UPGRADE_INSECURE_REQUESTS] => 1
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
    [HTTP_DNT] => 1
    [HTTP_ACCEPT_ENCODING] => gzip, deflate, sdch
    [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.8
    [HTTP_COOKIE] => wanted_view2=list; manage_view2=list; snatched_view2=list; soon_view2=thumbs; late_view2=list; blu_ray_com_new_releases_view=thumb; imdb_top_dvd_rentals_view=thumb; redirect=0; file-manager-response=; file-manager-response_count=; _ga=GA1.1.716250577.1485569358; user="2|1:0|10:1485631578|4:user|44:ODI0ZDBmZDg2NWU2NDI0OGFkMmZhM2ZjZmEzODRhOGM=|bdb7bd605faa8bfff123eb1c2a79b4c80f9aa6e306db8b7325c2d73a9e0a9daf"; sickrage_user="2|1:0|10:1485725624|13:sickrage_user|44:NDk0MWYxZTA5ZjY5YWViYjVkN2FkMWI0MjlmYzMxOTM=|c5cd6e1d4e5c0e47ef90d9f1e7e0e4845db539124233cca2e9110a73c74d944b"; wanted_view=list; manage_view=list; advanced_toggle_checked=1; late_view=list; imdb_movies_in_theaters_view=thumb; imdb_box_office_view=thumb; imdb_top_250_movies_view=thumb; login_cookie=1b9770687acd11d57a8112e2eaa08cbfc9264a65; login_salt=72; snatched_view=list; soon_view=thumb; suggest_view=thumb
    [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    [SERVER_SIGNATURE] => <address>Apache/2.4.18 (Ubuntu) Server at 192.168.1.146 Port 80</address>

    [SERVER_SOFTWARE] => Apache/2.4.18 (Ubuntu)
    [SERVER_NAME] => 192.168.1.146
    [SERVER_ADDR] => 192.168.1.146
    [SERVER_PORT] => 80
    [REMOTE_ADDR] => 192.168.1.100
    [DOCUMENT_ROOT] => /var/www/html
    [REQUEST_SCHEME] => http
    [CONTEXT_PREFIX] => 
    [CONTEXT_DOCUMENT_ROOT] => /var/www/html
    [SERVER_ADMIN] => webmaster@localhost
    [SCRIPT_FILENAME] => /var/www/html/mythweb/mythweb.php
    [REMOTE_PORT] => 53063
    [REDIRECT_URL] => /mythweb/
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PROTOCOL] => HTTP/1.1
    [REQUEST_METHOD] => GET
    [QUERY_STRING] => 
    [REQUEST_URI] => /
    [SCRIPT_NAME] => /mythweb/mythweb.php
    [PHP_SELF] => /mythweb/mythweb.php
    [REQUEST_TIME_FLOAT] => 1485918324.654
    [REQUEST_TIME] => 1485918324
    [STATUS] => 200
    [URL] => /mythweb/
    [HTTP_X_FORWARDED_PROTO] => 
    [HTTPS] => 
    [HTTP_PORT] => 80
)

==========================================================================

$constant_list["user"]: Array
(
    [ERROR] => 512
    [E_ASSERT_ERROR] => 4096
    [FATAL] => 256
    [PHP_MIN_VERSION] => 5.3
    [WARNING] => 1024
    [error_email] => 
    [gb] => 1073741824
    [hostname] => serve
    [http_host] => 192.168.1.146
    [kb] => 1024
    [mb] => 1048576
    [module] => 
    [modules_path] => /usr/share/mythtv/mythweb/modules
    [root] => /mythweb/
    [root_auth_url] => http://192.168.1.146/mythweb/
    [root_url] => http://192.168.1.146/mythweb/
    [stream_url] => http://192.168.1.146:80//mythweb/
    [tb] => 1099511627776
)
MythTV Backend Log Produced after I tried to rerun the backend setup. Fails on Database Configuration after I put in the above from config.xml

Code: Select all

Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: E CoreContext mythdbcon.cpp:229 (OpenDatabase) [DBManager6] Unable to connect to database!
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: E CoreContext mythdbcon.cpp:230 (OpenDatabase) Driver error was [1/2002]:#012QMYSQL: Unable to connect#012Database error was:#012Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: A CoreContext mythcontext.cpp:428 (FindDatabase) Cannot login to database
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: E CoreContext lirc.cpp:208 (Init) LIRC: Failed to connect to Unix socket '/var/run/lirc/lircd'#012#011#011#011eno: No such file or directory (2)
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext jsmenu.cpp:153 (ReadConfig) No joystick configuration found, not enabling joystick control
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: E CoreContext cecadapter.cpp:150 (Open) CECAdapter: Failed to load libcec.
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythudplistener.cpp:32 (Enable) UDPListener: Enabling
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext serverpool.cpp:508 (bind) Binding to UDP 127.0.0.1:0
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext serverpool.cpp:508 (bind) Binding to UDP 192.168.1.146:0
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext serverpool.cpp:508 (bind) Binding to UDP [::1]:0
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext serverpool.cpp:508 (bind) Binding to UDP [fe80::49a8:6eb8:c443:26f7%eno1]:0
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext serverpool.cpp:508 (bind) Binding to UDP 192.168.1.255:0
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythmainwindow.cpp:1041 (Init) Using Frameless Window
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythmainwindow.cpp:1052 (Init) Using Full Screen Window
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythmainwindow.cpp:1079 (Init) UI Screen Resolution: 1024 x 768
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythmainwindow.cpp:1185 (Init) Using the Qt painter
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythuiwebbrowser.cpp:1090 (LoadUserStyleSheet) MythUIWebBrowser: Loading css from - file:///usr/share/mythtv/themes/default/htmls/mythbrowser.css
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythuiwebbrowser.cpp:997 (Init) MythUIWebBrowser: enabling plugins
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: N CoreContext mythlocale.cpp:123 (LoadDefaultsFromXML) Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
Jan 31 21:11:11 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext langsettings.cpp:117 (Load) System Locale (en_US), Country (US), Language (en_US)
Jan 31 21:11:13 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythtranslation.cpp:73 (load) Loading en_us translation for module mythfrontend
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: E CoreContext mythdbcon.cpp:229 (OpenDatabase) [DBManager7] Unable to connect to database!
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: E CoreContext mythdbcon.cpp:230 (OpenDatabase) Driver error was [1/2002]:#012QMYSQL: Unable to connect#012Database error was:#012Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: A CoreContext mythcontext.cpp:428 (FindDatabase) Cannot login to database
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: E CoreContext lirc.cpp:208 (Init) LIRC: Failed to connect to Unix socket '/var/run/lirc/lircd'#012#011#011#011eno: No such file or directory (2)
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext jsmenu.cpp:153 (ReadConfig) No joystick configuration found, not enabling joystick control
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: E CoreContext cecadapter.cpp:150 (Open) CECAdapter: Failed to load libcec.
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythudplistener.cpp:32 (Enable) UDPListener: Enabling
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext serverpool.cpp:508 (bind) Binding to UDP 127.0.0.1:0
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext serverpool.cpp:508 (bind) Binding to UDP 192.168.1.146:0
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext serverpool.cpp:508 (bind) Binding to UDP [::1]:0
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext serverpool.cpp:508 (bind) Binding to UDP [fe80::49a8:6eb8:c443:26f7%eno1]:0
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext serverpool.cpp:508 (bind) Binding to UDP 192.168.1.255:0
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythmainwindow.cpp:1041 (Init) Using Frameless Window
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythmainwindow.cpp:1052 (Init) Using Full Screen Window
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythmainwindow.cpp:1079 (Init) UI Screen Resolution: 1024 x 768
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythmainwindow.cpp:1185 (Init) Using the Qt painter
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythuiwebbrowser.cpp:1090 (LoadUserStyleSheet) MythUIWebBrowser: Loading css from - file:///usr/share/mythtv/themes/default/htmls/mythbrowser.css
Jan 31 21:15:08 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythuiwebbrowser.cpp:997 (Init) MythUIWebBrowser: enabling plugins
Jan 31 21:15:09 serve mythtv-setup.real: mythtv-setup[8597]: N CoreContext mythlocale.cpp:123 (LoadDefaultsFromXML) Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
Jan 31 21:15:09 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext langsettings.cpp:117 (Load) System Locale (en_US), Country (US), Language (en_US)
Jan 31 21:15:10 serve mythtv-setup.real: mythtv-setup[8597]: I CoreContext mythtranslation.cpp:73 (load) Loading en_us translation for module mythfrontend
Jan 31 21:15:12 serve mythtv-setup.real: mythtv-setup[8597]: A CoreContext mythcontext.cpp:589 (PromptForDatabaseParams) User cancelled database configuration
Jan 31 21:15:12 serve mythtv-setup.real: mythtv-setup[8597]: E CoreContext main.cpp:354 (main) Failed to init MythContext, exiting.
 
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Code: Select all

stack@serve:~$ mythbackend

Cannot login to database

Would you like to configure the database connection now? [no]  2017-01-31 21:30:32.696304 C  mythbackend version: fixes/0.28 [v0.28-115-g15cc313] www.mythtv.org
2017-01-31 21:30:32.696321 C  Qt version: compile: 5.5.1, runtime: 5.5.1
2017-01-31 21:30:32.696323 N  Enabled verbose msgs:  general
2017-01-31 21:30:32.696331 N  Setting Log Level to LOG_INFO
2017-01-31 21:30:32.706864 I  Added logging to the console
2017-01-31 21:30:32.707131 I  Setup Interrupt handler
2017-01-31 21:30:32.707136 I  Setup Terminated handler
2017-01-31 21:30:32.707141 I  Setup Segmentation fault handler
2017-01-31 21:30:32.707144 I  Setup Aborted handler
2017-01-31 21:30:32.707149 I  Setup Bus error handler
2017-01-31 21:30:32.707153 I  Setup Floating point exception handler
2017-01-31 21:30:32.707156 I  Setup Illegal instruction handler
2017-01-31 21:30:32.707161 I  Setup Real-time signal 0 handler
2017-01-31 21:30:32.707165 I  Setup Hangup handler
2017-01-31 21:30:32.707228 N  Using runtime prefix = /usr
2017-01-31 21:30:32.707231 N  Using configuration directory = /home/stack/.mythtv
2017-01-31 21:30:32.707267 I  Assumed character encoding: en_US.UTF-8
2017-01-31 21:30:32.707447 N  Empty LocalHostName.
2017-01-31 21:30:32.707453 I  Using localhost value of serve
2017-01-31 21:30:32.708608 E  [DBManager0] Unable to connect to database!
2017-01-31 21:30:32.708620 E  Driver error was [1/2002]:
QMYSQL: Unable to connect
Database error was:
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
apparmor="DENIED"

Code: Select all

stack@serve:~$ sudo service mysql start   
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.

Code: Select all

stack@serve:~$ status mysql.service
status: Name "com.ubuntu.Upstart" does not exist

Code: Select all

stack@serve:~$ journalctl -xe
Jan 31 21:33:59 serve systemd[1]: mysql.service: Unit entered failed state.
Jan 31 21:33:59 serve systemd[1]: mysql.service: Failed with result 'exit-code'.
Jan 31 21:33:59 serve sudo[15470]: pam_unix(sudo:session): session closed for us
Jan 31 21:34:00 serve systemd[1]: mysql.service: Service hold-off time over, sch
Jan 31 21:34:00 serve systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Jan 31 21:34:00 serve systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profi
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profi
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profi
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8355): appar
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8356): appar
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8357): appar
Jan 31 21:34:02 serve systemd[1]: mysql.service: Main process exited, code=exite
lines 1965-1987/1987 (END)
Jan 31 21:33:59 serve systemd[1]: mysql.service: Unit entered failed state.
Jan 31 21:33:59 serve systemd[1]: mysql.service: Failed with result 'exit-code'.
Jan 31 21:33:59 serve sudo[15470]: pam_unix(sudo:session): session closed for us
Jan 31 21:34:00 serve systemd[1]: mysql.service: Service hold-off time over, sch
Jan 31 21:34:00 serve systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Jan 31 21:34:00 serve systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profi
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profi
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profi
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8355): appar
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8356): appar
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8357): appar
Jan 31 21:34:02 serve systemd[1]: mysql.service: Main process exited, code=exite
~
~
lines 1965-1987/1987 (END)
Jan 31 21:33:59 serve systemd[1]: mysql.service: Unit entered failed state.
Jan 31 21:33:59 serve systemd[1]: mysql.service: Failed with result 'exit-code'.
Jan 31 21:33:59 serve sudo[15470]: pam_unix(sudo:session): session closed for user root
Jan 31 21:34:00 serve systemd[1]: mysql.service: Service hold-off time over, scheduling restart
Jan 31 21:34:00 serve systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Jan 31 21:34:00 serve systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/m
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/m
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/m
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8355): apparmor="DENIED" op
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8356): apparmor="DENIED" op
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8357): apparmor="DENIED" op
Jan 31 21:34:02 serve systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAI
~
~
lines 1965-1987/1987 (END)
Jan 31 21:33:59 serve systemd[1]: mysql.service: Unit entered failed state.
Jan 31 21:33:59 serve systemd[1]: mysql.service: Failed with result 'exit-code'.
Jan 31 21:33:59 serve sudo[15470]: pam_unix(sudo:session): session closed for user root
Jan 31 21:34:00 serve systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Jan 31 21:34:00 serve systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Jan 31 21:34:00 serve systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/15634/status"
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/
Jan 31 21:34:00 serve audit[15634]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/15634/status"
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8355): apparmor="DENIED" operation="open" profile="/usr/sbin
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8356): apparmor="DENIED" operation="open" profile="/usr/sbin
Jan 31 21:34:00 serve kernel: audit: type=1400 audit(1485920040.034:8357): apparmor="DENIED" operation="open" profile="/usr/sbin
Jan 31 21:34:02 serve systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Last edited by axel77 on Thu Feb 02, 2017 4:20 am, edited 1 time in total.
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Mysql errors on new mythbuntu 16.04 setup

Post by MikeB2013 »

I am assuming that you have a combined mythtv frontend backend setup.

Beware that mythbuntu 16.04 uses Systemd (not Upstart), by default. Systemd starts many things at once when booting, which can lead to race conditions under some circumstances (typically network and tuner cards may not be fully setup before mythbackend starts, this is particularly noticeable on systems where the SSDs are installed, but can also occur on spinning disks.

First thing I would do is make sure you are running the latest version of mythtv 0.28 (the version installed via mythbuntu is the original which was released some tine ago, there have been many improvements since then).

So in a terminal do (this gets latest mythtv 0.28/fixes, makes sure the operating system is up to date and only starts mythbackend after networking has been established):

sudo add-apt-repository ppa:mythbuntu/0.28
sudo apt update
sudo apt dist-upgrade
sudo systemctl enable NetworkManager-wait-online.service
sudo systemctl edit mythtv-backend.service

Then paste the following 2 lines
[Unit]
After=NetworkManager-wait-online.service

Then exit from the edit screen (it uses nano by default, so Ctrl+x, then y, then Return key)

sudo reboot

To check that mythbackend database can be accessed do the following in a terminal (when prompted for password use the one from config.xml (1qXilKkR):
mysql -umythtv -p mythconverg

You should get a response like:

Code: Select all

mike@mythtv-dev:~$ mysql -umythtv -p mythconverg
Enter password: 
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 MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 31
Server version: 5.7.17-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>
Edit:
to start mysql use sudo systemctl start mysql.service

Mike
axel77
Newcomer
Posts: 8
Joined: Mon Jan 30, 2017 5:35 am
United States of America

Re: Mysql errors on new mythbuntu 16.04 setup

Post by axel77 »

Thanks for the help Mike. I am not using the same machine for front/backend, this is simply a dedicated backend server/nas for remote clients to connect. And unfortunately, after upgrading and editing mythtv-backend.service, I'm still getting the same errors. Everything I'm finding that deals with ERROR 2002 within mysql leads to an issue with the 'my.cnf' file. Mine is located in /etc/mysql/my.cnf, and it appears to be original/unappended. Should it look different?

Code: Select all

stack@serve:~$ mysql -u mythtv -p mythconverg                                   
Enter password: 1qXilKkR
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Code: Select all

stack@serve:~$ systemctl start mysql.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'mysql.service'.
Authenticating as: stack,,, (stack)
Password:
==== AUTHENTICATION COMPLETE ===
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.

Code: Select all

stack@serve:~$ systemctl status mysql.service
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start-post) (Result: exit-code) since Wed 2017-02-01 12:05:59 CST; 8s ago
  Process: 17549 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
  Process: 17546 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 17549 (code=exited, status=1/FAILURE);         : 17550 (mysql-systemd-s)
   CGroup: /system.slice/mysql.service
           └─control
             ├─17550 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─17601 sleep 1

Feb 01 12:05:59 serve systemd[1]: Starting MySQL Community Server...
Feb 01 12:06:02 serve systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE

Code: Select all

stack@serve:~$ journalctl -xe
-- The result is failed.
Feb 01 12:06:59 serve systemd[1]: mysql.service: Unit entered failed state.
Feb 01 12:06:59 serve systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 01 12:07:00 serve systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Feb 01 12:07:00 serve systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Feb 01 12:07:00 serve systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Feb 01 12:07:00 serve audit[17843]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/17843/status" pi
Feb 01 12:07:00 serve audit[17843]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/no
Feb 01 12:07:00 serve audit[17843]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/17843/status" pi
Feb 01 12:07:00 serve kernel: audit: type=1400 audit(1485972420.119:360): apparmor="DENIED" operation="open" profile="/usr/sbin/my
Feb 01 12:07:00 serve kernel: audit: type=1400 audit(1485972420.119:361): apparmor="DENIED" operation="open" profile="/usr/sbin/my
Feb 01 12:07:00 serve kernel: audit: type=1400 audit(1485972420.119:362): apparmor="DENIED" operation="open" profile="/usr/sbin/my
Feb 01 12:07:02 serve systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
/etc/mysql/my.cnf

Code: Select all

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mysql errors on new mythbuntu 16.04 setup

Post by bill6502 »

I'd maximize your terminal window and then try to restart mysql. When it fails
and you do journalctl -xe, you'll get the rest of these truncated messages:

Code: Select all

Feb 01 12:07:00 serve kernel: audit: type=1400 audit(1485972420.119:360): apparmor="DENIED" operation="open" profile="/usr/sbin/my
etc.
Thinking that apparmor is preventing SQL startup. sudo apparmor_status may yield some hints.

You can also do: sudo cat /var/log/mysql/error.log to see if mysql is logging
any useful messages when it tries to start.

You might be using MariaDB rather then MySQL (which is OK.) This will answer that question:
mysql --version
axel77
Newcomer
Posts: 8
Joined: Mon Jan 30, 2017 5:35 am
United States of America

Re: Mysql errors on new mythbuntu 16.04 setup

Post by axel77 »

Apparmor has /usr/sbin/mysqld in enforce mode. Is it wise to disable or is there a better alternative?

Code: Select all

stack@serve:~$ journalctl -xe
--
-- The result is failed.
Feb 01 14:00:56 serve systemd[1]: mysql.service: Unit entered failed state.
Feb 01 14:00:56 serve systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 01 14:00:56 serve systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Feb 01 14:00:56 serve systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Feb 01 14:00:56 serve systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Feb 01 14:00:56 serve audit[13779]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/13779/status" pid=13779 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=106 ouid=106
Feb 01 14:00:56 serve audit[13779]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=13779 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=106 ouid=0
Feb 01 14:00:56 serve audit[13779]: AVC apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/13779/status" pid=13779 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=106 ouid=106
Feb 01 14:00:56 serve kernel: audit: type=1400 audit(1485979256.593:1038): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/13779/status" pid=13779 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=106 ouid=106
Feb 01 14:00:56 serve kernel: audit: type=1400 audit(1485979256.593:1039): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=13779 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=106 ouid=0
Feb 01 14:00:56 serve kernel: audit: type=1400 audit(1485979256.593:1040): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/13779/status" pid=13779 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=106 ouid=106
lines 2292-2314/2314 (END)
--

Code: Select all

stack@serve:~$ sudo apparmor_status
[sudo] password for stack:
apparmor module is loaded.
16 profiles are loaded.
16 profiles are in enforce mode.
   /sbin/dhclient
   /usr/bin/ubuntu-core-launcher
   /usr/lib/NetworkManager/nm-dhcp-client.action
   /usr/lib/NetworkManager/nm-dhcp-helper
   /usr/lib/connman/scripts/dhclient-script
   /usr/lib/cups/backend/cups-pdf
   /usr/lib/lightdm/lightdm-guest-session
   /usr/lib/lightdm/lightdm-guest-session//chromium
   /usr/lib/snapd/snap-confine
   /usr/lib/snapd/snap-confine//mount-namespace-capture-helper
   /usr/sbin/cups-browsed
   /usr/sbin/cupsd
   /usr/sbin/cupsd//third_party
   /usr/sbin/mysqld
   /usr/sbin/ntpd
   /usr/sbin/tcpdump
0 profiles are in complain mode.
3 processes have profiles defined.
3 processes are in enforce mode.
   /sbin/dhclient (1229)
   /usr/sbin/cups-browsed (979)
   /usr/sbin/ntpd (1739)
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.

Code: Select all

stack@serve:~$ sudo cat /var/log/mysql/error.log
2017-02-01T20:06:29.362581Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2017-02-01T20:06:29.362631Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2017-02-01T20:06:29.503190Z 0 [Warning] option 'net_buffer_length': unsigned value 8388608 adjusted to 1048576
2017-02-01T20:06:29.503233Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-02-01T20:06:29.504540Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.17-0ubuntu0.16.04.1) starting as process 15181 ...
2017-02-01T20:06:29.507872Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-02-01T20:06:29.507892Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-02-01T20:06:29.507895Z 0 [Note] InnoDB: Uses event mutexes
2017-02-01T20:06:29.507898Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-02-01T20:06:29.507901Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-02-01T20:06:29.507925Z 0 [Note] InnoDB: Using Linux native AIO
2017-02-01T20:06:29.508091Z 0 [Note] InnoDB: Number of pools: 1
2017-02-01T20:06:29.508160Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-02-01T20:06:29.509039Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-02-01T20:06:29.514897Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-02-01T20:06:29.516122Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-02-01T20:06:29.527271Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-02-01T20:06:29.537491Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-02-01T20:06:29.537546Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-02-01T20:06:30.326331Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2017-02-01T20:06:30.326917Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2017-02-01T20:06:30.326924Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2017-02-01T20:06:30.327791Z 0 [Note] InnoDB: Waiting for purge to start
2017-02-01T20:06:30.377935Z 0 [Note] InnoDB: 5.7.17 started; log sequence number 32379474
2017-02-01T20:06:30.378066Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2017-02-01T20:06:30.378113Z 0 [Note] Plugin 'FEDERATED' is disabled.
2017-02-01T20:06:30.378206Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170201 14:06:30
2017-02-01T20:06:30.381160Z 0 [ERROR] unknown variable 'table_cache=128'
2017-02-01T20:06:30.381179Z 0 [ERROR] Aborting

2017-02-01T20:06:30.381184Z 0 [Note] Binlog end
2017-02-01T20:06:30.381217Z 0 [Note] Shutting down plugin 'ngram'
2017-02-01T20:06:30.381220Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2017-02-01T20:06:30.381222Z 0 [Note] Shutting down plugin 'partition'
2017-02-01T20:06:30.381224Z 0 [Note] Shutting down plugin 'ARCHIVE'
2017-02-01T20:06:30.381226Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2017-02-01T20:06:30.381228Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2017-02-01T20:06:30.381230Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2017-02-01T20:06:30.381232Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2017-02-01T20:06:30.381233Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2017-02-01T20:06:30.381235Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2017-02-01T20:06:30.381237Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2017-02-01T20:06:30.381239Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2017-02-01T20:06:30.381240Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2017-02-01T20:06:30.381242Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2017-02-01T20:06:30.381244Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2017-02-01T20:06:30.381246Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2017-02-01T20:06:30.381248Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2017-02-01T20:06:30.381249Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2017-02-01T20:06:30.381251Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2017-02-01T20:06:30.381253Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2017-02-01T20:06:30.381255Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2017-02-01T20:06:30.381257Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2017-02-01T20:06:30.381258Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2017-02-01T20:06:30.381268Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2017-02-01T20:06:30.381270Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2017-02-01T20:06:30.381272Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2017-02-01T20:06:30.381273Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2017-02-01T20:06:30.381275Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2017-02-01T20:06:30.381277Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2017-02-01T20:06:30.381279Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2017-02-01T20:06:30.381281Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2017-02-01T20:06:30.381282Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2017-02-01T20:06:30.381284Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2017-02-01T20:06:30.381286Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2017-02-01T20:06:30.381288Z 0 [Note] Shutting down plugin 'InnoDB'
2017-02-01T20:06:30.381318Z 0 [Note] InnoDB: FTS optimize thread exiting.
2017-02-01T20:06:30.381369Z 0 [Note] InnoDB: Starting shutdown...
2017-02-01T20:06:30.481515Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2017-02-01T20:06:30.481633Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 170201 14:06:30
]

Code: Select all

stack@serve:~$ mysql --version
mysql  Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using  EditLine wrapper
MikeB2013
Senior
Posts: 519
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: Mysql errors on new mythbuntu 16.04 setup

Post by MikeB2013 »

In /var/log/mysql/error.log it has
2017-02-01T20:06:30.381160Z 0 [ERROR] unknown variable 'table_cache=128'
This is preventing mysql from starting.

I suspect you have a file named mythtv-tweaks.cnf in /etc/mysql/conf.d/

Edit this file and comment out (just put # at start of line) the line
table_cache = 128

so it looks like
#table_cache = 128

then reboot your server

Mike
axel77
Newcomer
Posts: 8
Joined: Mon Jan 30, 2017 5:35 am
United States of America

Re: Mysql errors on new mythbuntu 16.04 setup

Post by axel77 »

THANK YOU MIKE! Mysql starts up without errors and I can now get back into everything!

Of course though now that I'm actually able to connect to the backend (frontend kodi running mythtv add-on) every channel is coming up as "channel unavailable"...argh!

I have an HDHomerun extend that is able to pick up all local stations, and I can watch diectly through their app. Any ideas how to go about diagnosing this issue?

EDIT: Solved my "channel unavailable" issue, had to disable ipv6 on the backend.

From http://askubuntu.com/questions/440649/h ... untu-14-04

Code: Select all

To disable ipv6, you have to open /etc/sysctl.conf using any text editor and insert the following lines at the end:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
If ipv6 is still not disabled, then the problem is that sysctl.conf is still not activated.

To solve this, open a terminal(Ctrl+Alt+T) and type the command,

sudo sysctl -p
You will see this in the terminal:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
After that, if you run:

$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
It will report:

1
If you see 1, ipv6 has been successfully disabled.
Post Reply