Opened 14 years ago
Closed 14 years ago
#9742 closed Bug Report - General (fixed)
Mythtv-setup fails to create the initial database
Reported by: | Owned by: | sphery | |
---|---|---|---|
Priority: | minor | Milestone: | 0.24.1 |
Component: | MythTV - Mythtv-setup | Version: | Unspecified |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description (last modified by )
I have installed mythtv, and mysql. After creating the initial database, mythtv-setup can not find the tables it needs.
Steps to reproduce: 1) regenerate the database:
[cedric@tvpc ~]$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 13 Server version: 5.5.11-log Source distribution Copyright (c) 2000, 2010, 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> drop database mythconverg; Query OK, 1 row affected (0.08 sec) mysql> CREATE DATABASE IF NOT EXISTS mythconverg; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.05 sec) mysql> GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "mythtv"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; Query OK, 1 row affected (0.00 sec) mysql> quit Bye
2)Run mythtv-setup:
[cedric@tvpc ~]$ mythtv-setup 2011-04-19 19:59:06.541 Using runtime prefix = /usr 2011-04-19 19:59:06.541 Using configuration directory = /home/cedric/.mythtv 2011-04-19 19:59:06.543 Unable to read configuration file mysql.txt 2011-04-19 19:59:06.543 Empty LocalHostName. 2011-04-19 19:59:06.543 Using localhost value of tvpc 2011-04-19 19:59:06.568 New DB connection, total: 1 2011-04-19 19:59:06.578 Connected to database 'mythconverg' at host: localhost 2011-04-19 19:59:06.603 Closing DB connection named 'DBManager0' 2011-04-19 19:59:06.605 Connected to database 'mythconverg' at host: localhost 2011-04-19 19:59:06.607 Error preparing query: SELECT data FROM settings WHERE value = :KEY AND hostname = :HOSTNAME 2011-04-19 19:59:06.607 Driver error was [2/1146]: QMYSQL3: Unable to prepare statement Database error was: Table 'mythconverg.settings' doesn't exist 2011-04-19 19:59:06.609 Error preparing query: SELECT data FROM settings WHERE value = :KEY AND hostname IS NULL 2011-04-19 19:59:06.609 Driver error was [2/1146]: QMYSQL3: Unable to prepare statement Database error was: Table 'mythconverg.settings' doesn't exist 2011-04-19 19:59:06.611 Error preparing query: SELECT data FROM settings WHERE value = :KEY AND hostname = :HOSTNAME 2011-04-19 19:59:06.611 Driver error was [2/1146]: QMYSQL3: Unable to prepare statement Database error was: Table 'mythconverg.settings' doesn't exist ....... 2011-04-19 19:59:07.813 Error preparing query: SELECT data FROM settings WHERE value = :KEY AND hostname = :HOSTNAME 2011-04-19 19:59:07.813 Driver error was [2/1146]: QMYSQL3: Unable to prepare statement Database error was: Table 'mythconverg.settings' doesn't exist 2011-04-19 19:59:07.814 Error preparing query: SELECT data FROM settings WHERE value = :KEY AND hostname IS NULL 2011-04-19 19:59:07.814 Driver error was [2/1146]: QMYSQL3: Unable to prepare statement Database error was: Table 'mythconverg.settings' doesn't exist 2011-04-19 19:59:08.725 MythFontProperties, Error: Failed to load 'Liberation Sans', got 'DejaVu Sans' instead Location: /usr/share/mythtv/themes/default/base.xml @ 11 Name: 'basetiny' Type: 'fontdef' 2011-04-19 19:59:08.726 MythFontProperties, Error: Failed to load 'Liberation Sans', got 'DejaVu Sans' instead Location: /usr/share/mythtv/themes/default/base.xml @ 36 Name: 'basetinyred' Type: 'fontdef' 2011-04-19 19:59:08.727 MythFontProperties, Error: Failed to load 'Liberation Sans', got 'DejaVu Sans' instead Location: /usr/share/mythtv/themes/default/base.xml @ 80 Name: 'basemediumyellow' Type: 'fontdef' 2011-04-19 19:59:08.781 Error preparing query: SELECT data FROM settings WHERE value = :KEY AND hostname = :HOSTNAME 2011-04-19 19:59:08.781 Driver error was [2/1146]: QMYSQL3: Unable to prepare statement Database error was: Table 'mythconverg.settings' doesn't exist 2011-04-19 19:59:08.783 Error preparing query: SELECT data FROM settings WHERE value = :KEY AND hostname IS NULL 2011-04-19 19:59:08.783 Driver error was [2/1146]: QMYSQL3: Unable to prepare statement Database error was: Table 'mythconverg.settings' doesn't exist 2011-04-19 19:59:19.386 System Locale (en_US), Country (US), Language (en) ^C [cedric@tvpc ~]$
My versions: mysql Ver 14.14 Distrib 5.5.11, for Linux (i686) using readline 5.1 Linux tvpc 2.6.38-ARCH #1 SMP PREEMPT Wed Mar 30 07:14:27 UTC 2011 i686 Intel(R) Pentium(R) 4 CPU 1.60GHz GenuineIntel GNU/Linux
See also this forum discussion: http://www.mythtvtalk.com/fresh-ach-linux-install-cannot-create-initial-database-mythconverg-14687/
Attachments (1)
Change History (4)
Changed 14 years ago by
Attachment: | mythtv-version added |
---|
comment:1 Changed 14 years ago by
Description: | modified (diff) |
---|---|
Owner: | changed from danielk to sphery |
Status: | new → accepted |
comment:2 Changed 14 years ago by
Fix the check to see if we have a valid DB schema.
Change the code that checks to see if we have a schema available so that it doesn't use a count of the value returned by QSqlDatabase::tables(). The tables() function returns a list of all tables visible to the user--even tables in other databases--so can result in false positives.
Refs #9742.
Changeset: eda0880f93f6de4c501ae7304787825fc5cdd588
comment:3 Changed 14 years ago by
Milestone: | unknown → 0.24.1 |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
Fix the check to see if we have a valid DB schema.
Change the code that checks to see if we have a schema available so that it doesn't use a count of the value returned by QSqlDatabase::tables(). The tables() function returns a list of all tables visible to the user--even tables in other databases--so can result in false positives.
Fixes #9742. (cherry picked from commit eda0880f93f6de4c501ae7304787825fc5cdd588)
Changeset: 4fe108c258777901c49d069267de3202653fea26
version of mythtv