[mythtv-users] slow mythweb?

Michael T. Dean mtdean at thirdcontact.com
Fri Apr 25 17:40:49 UTC 2008


On 04/25/2008 11:34 AM, Michael T. Dean wrote:
> On 04/25/2008 10:27 AM, Udo van den Heuvel wrote:
>   
>> Deleted the database (after a backup).
>> Created the database using the mc.sql file.
>> ran mythtv-setup.
>> Various errors about not existing tables.
> That indicates that the procedure you followed to create your new MythTV 
> DB is wrong.  Since you won't post actual error messages (for fear, I 
> presume, that we could prove that 0.21-fixes actually works), I can't 
> tell you what you need to do differently.

After looking at the log info that you included in the ticket (rather 
than first asking about it here to confirm that it's actually a bug 
before wasting developer time), it looks like you're trying to do 
something fancy (like you're not using the standard 
database/username/password and you're not telling Myth the proper 
information when it asks).

Quoted here for reference:
>  2008-04-25 16:27:11.742 Using runtime prefix = /usr, libdir = /usr/lib
>  2008-04-25 16:27:11.774 DPMS is active.
>  2008-04-25 16:27:11.777 Empty LocalHostName.
>  2008-04-25 16:27:11.778 Using localhost value of recorder
>  2008-04-25 16:27:11.833 New DB connection, total: 1
>  2008-04-25 16:27:11.863 Connected to database 'mythconverg' at host:
>  localhost
>  2008-04-25 16:27:11.865 Closing DB connection named 'DBManager0'
>  2008-04-25 16:27:11.873 Primary screen 0.
>  2008-04-25 16:27:11.875 Connected to database 'mythconverg' at host:
>  localhost
>  2008-04-25 16:27:11.878 Using screen 0, 720x576 at 0,0
>  2008-04-25 16:27:11.907 New DB connection, total: 2
>  2008-04-25 16:27:11.910 Connected to database 'mythconverg' at host:
>  localhost
>  2008-04-25 16:27:11.913 Current Schema Version: 0
>  2008-04-25 16:27:11.916 DataDirectProcessor::FixProgramIDs() -- begin
>  2008-04-25 16:27:11.918 New DB DataDirect connection
>  2008-04-25 16:27:11.920 Connected to database 'mythconverg' at host:
>  localhost
>  2008-04-25 16:27:11.922 DB Error (Fixing program ids in recorded):
>  Query was:
>  UPDATE recorded SET programid=CONCAT(SUBSTRING(programid, 1, 2),
>  '00', SUBSTRING(programid, 3)) WHERE length(programid) = 12
>  Driver error was [2/1146]:
>  QMYSQL3: Unable to execute query
>  Database error was:
>  Table 'mythconverg.recorded' doesn't exist
>   

Perfectly normal first-run errors.  Nothing to be concerned about.

>  2008-04-25 16:27:11.928 DB Error (Clear setting):
> ...
>  2008-04-25 16:27:11.929 DB Error (SaveSettingOnHost query failure: ):
> ...
>  2008-04-25 16:27:11.933 DB Error (StorageGroup::StorageGroup()):
> ...
>   

More normal first-run errors.

>  2008-04-25 16:27:11.934 New DB connection, total: 3
>  2008-04-25 16:27:11.936 Connected to database 'mythconverg' at host:
>  localhost
>  2008-04-25 16:27:11.939 SG(DB Backups) Error: Directory value for Default
>  Storage Group is empty.  Using hardcoded default value of '/mnt/store'
>  2008-04-25 16:27:11.940 SG(DB Backups) Error: FindNextDirMostFree:
>  '/mnt/store' does not exist!
>   

Normal.

>  2008-04-25 16:27:11.941 Backing up database to file: /tmp/mythconverg--
>  20080425162711.sql
>  2008-04-25 16:27:11.975 DBUtil Error: Error backing up database: mysqldump
>  --defaults-extra-file='/tmp/mythtv_db_backup_conf_w0MfvS'
>  --host='localhost' --user='mythtv' --add-drop-table --add-locks --allow-
>  keywords --complete-insert --extended-insert --lock-tables --no-create-db
>  --quick 'mythconverg' > '/tmp/mythconverg--20080425162711.sql' 2>/dev/null
>  (512)
>   

This is the first error that should not occur.  Myth should be able to 
do the backup.  The error code indicates a problem connecting to the 
MySQL server and/or the mythconverg database on that server.  It could 
be that you have a ~/.my.cnf or /etc/my.cnf that specifies a password 
for some other MySQL user (in which case the built-in backup won't work 
for you).

Otherwise, are you using a database named mythconverg on localhost using 
a user named mythtv with password mythtv?  If anything other than the 
password differs, you're not properly specifying the information to Myth 
(i.e. when configuring the DB in the GUI).  If the password differs, you 
may or may not be specifying the information properly (I can't tell with 
the information I have).

>  2008-04-25 16:27:11.978 DB Error (Clear setting):
> ...
>  2008-04-25 16:27:11.980 DB Error (SaveSettingOnHost query failure: ):
> ...
>   

Normal.

>  2008-04-25 16:27:12.038 Primary screen 0.
>  2008-04-25 16:27:12.041 Using screen 0, 720x576 at 0,0
>  2008-04-25 16:27:12.047 Switching to square mode (blue)
>  2008-04-25 16:27:12.123 Using the Qt painter
>  2008-04-25 16:27:12.124 lirc_init failed for mythtv, see preceding
>  messages
>  2008-04-25 16:27:12.126 JoystickMenuClient Error: Joystick disabled -
>  Failed to read /root/.mythtv/joystickmenurc
>  2008-04-25 16:27:18.798 DB Error (Clear setting):
>  Query was:
>  DELETE FROM settings WHERE value = 'Language' AND hostname = 'recorder' ;
> ...
>  2008-04-25 16:27:18.799 DB Error (SaveSettingOnHost query failure: ):
> ...
>  2008-04-25 16:27:18.802 DB Error (Clear setting):
> ...
>  2008-04-25 16:27:18.803 DB Error (SaveSettingOnHost query failure: ):
> ...
>   

Normal.

>  2008-04-25 16:27:21.528 Couldn't upgrade database to new schema.
>   

And this is the /only/ error that's definitely an error.  It actually 
looks exactly like it prompted you about doing a database upgrade and 
you said, "Exit," instead of, "Upgrade," since there's no additional 
detail (which should exist if you confirm the prompt rather than 
canceling).  I mean it looks *exactly* like it does when you cancel...

BTW, I just did a:

DROP DATABASE mythconverg;

then ran:

mysql -uroot -p < database/mc.sql

then one time I did and one time I did not do (so I ran with and without 
~/.mythtv):

rm -r ~/.mythtv

then ran mythtv-setup and it created an initial database without issue 
on both tests.  I even forced the backup to fail and it still worked.  
Therefore, assuming you told Myth to go ahead and upgrade your database, 
I'm thinking that you still have some cruft left over from your previous 
install which is giving Myth the wrong information about how to connect 
to the database.  I have a hunch it's invalid MySQL permissions (based 
on the mysqldump error code)--i.e. invalid username/password or improper 
GRANTs.

Mike


More information about the mythtv-users mailing list