[mythtv-users] Advice on Partitions

jarpublic at gmail.com jarpublic at gmail.com
Wed Mar 4 13:33:55 UTC 2009


On Wed, Mar 4, 2009 at 8:01 AM, Jonno <jonnojohnson at gmail.com> wrote:
> On Wed, Mar 4, 2009 at 12:43 AM, Rod Smith <mythtv at rodsbooks.com> wrote:
>> On Wednesday 04 March 2009 12:15:28 am Jonno wrote:
>>> On Tue, Mar 3, 2009 at 10:02 PM, Jonno <jonnojohnson at gmail.com> wrote:
>>> > I
>>> > just noticed that the Mythbuntu LiveCD install created a 10GB ext
>>> > partition (sda1) for everything except /var/lib which it mounted in a
>>> > 300GB xfs partition (sda6) which it created (obviously expecting that
>>> > this is where I would store my recordings).
>> ...
>>> Damnit, scratch all that. I stupidly rebooted after commenting out the
>>> line in /etc/fstab that mounts sda6 on /var/lib. On reboot it threw me
>>> out to a command line and I managed to uncomment the line and reboot
>>> again. However now mythfrontend won't run and even mythtv-setup
>>> doesn't even run correctly.
>>>
>>> Am I totally hosed?!!!
>>>
>>> Here is the mythbackend log:
>>>
>>> QSqlQuery::exec: database not open
>>> 2009-03-03 22:31:24.996 Using runtime prefix = /usr
>>> 2009-03-03 22:31:25.054 DBUserName is not set in mysql.txt
>>> 2009-03-03 22:31:25.061 DBPassword is not set in mysql.txt
>>> 2009-03-03 22:31:25.062 DBName is not set in mysql.txt
>>> 2009-03-03 22:31:25.063 Empty LocalHostName.
>>> 2009-03-03 22:31:25.068 Using localhost value of jonno-mythbuntu
>>> 2009-03-03 22:31:25.209 New DB connection, total: 1
>>> 2009-03-03 22:31:25.276 Connected to database '' at host: localhost
>>> 2009-03-03 22:31:25.290 Closing DB connection named 'DBManager0'
>>> 2009-03-03 22:31:25.309 Connected to database '' at host: localhost
>>> 2009-03-03 22:31:25.312 ERROR: Unable to create schemalock table:
>>> Driver error was [2/1046]:
>>> QMYSQL3: Unable to execute query
>>> Database error was:
>>> No database selected
>>
>> I'm not a MySQL expert, but it looks to me as if your MySQL database has
>> become damaged or lost. This database normally resides in /var/lib/mysql, so
>> when you rebooted without your normal /var/lib partition, MySQL would have
>> started up, found no database there, and perhaps tried to create it or done
>> something strange. When you restored /var/lib... I'm not sure. If MySQL
>> stores all its data in /var/lib, I'd expect it would have recovered OK, but
>> if it's squirreled away some data elsewhere, it might have gotten confused by
>> the inconsistency. Or perhaps the database became corrupt if, say, you forced
>> an unmount when the database was in use. (I'd expect Linux would refuse to
>> unmount the partition in which an in-use MySQL database resides, but if you
>> tried to force the issue it might have caused some corruption.)
>>
>> In any event, I suggest you focus on MySQL issues rather than MythTV issues
>> per se.
>
> Thanks for the tip Rod. Unfortunately I know jack taco about MySQL.
> The only steps I took were to comment out the line in /etc/fstab then
> reboot so I didnt try to unmount /var/lib while it was being used.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

It says that the username and password were not set in mysql.txt.
Usually there is a file with the mythtv login info located in
/etc/mythtv/mysql.txt. Check if that file is there and if it has the
correct information in it it. You can also try logging in from the
command line like: 'mysql -u mythtv -p mythconverg'. That will prompt
you for your mythtv mysql password. If you can log in from the command
line. Then you just need to make sure that the same username and
password are in the mysql.txt file.

Also if they database is up and you can log int then you can use
mythweb to see if there are problems with mysql. Open up mythweb and
go to the settings page there is a database section. You can ask it to
check the mythtv tables. You can also tell it to repair them if
something minor got corrupt.


More information about the mythtv-users mailing list