[mythtv-users] 0.26 upgrade "no database selected"

Steven Adeff adeffs.mythtv at gmail.com
Sat Oct 6 02:06:03 UTC 2012


On Fri, Oct 5, 2012 at 9:45 PM, Steven Adeff <adeffs.mythtv at gmail.com> wrote:
> On Fri, Oct 5, 2012 at 9:32 PM, Thomas Mashos <thomas at mashos.com> wrote:
>> On Fri, Oct 5, 2012 at 4:54 PM, Steven Adeff <adeffs.mythtv at gmail.com> wrote:
>>> On Fri, Oct 5, 2012 at 6:38 PM, Thomas Mashos <thomas at mashos.com> wrote:
>>>> On Fri, Oct 5, 2012 at 3:34 PM, Andrew <mythtv at heathsworld.com> wrote:
>>>>> On Fri, Oct 5, 2012 at 4:01 PM, Thomas Mashos <thomas at mashos.com> wrote:
>>>>>>
>>>>>> On Wed, Oct 3, 2012 at 7:53 AM, Steven Adeff <adeffs.mythtv at gmail.com>
>>>>>> wrote:
>>>>>> > On Wed, Oct 3, 2012 at 9:28 AM, Martin Moores <moores.martin at gmail.com>
>>>>>> > wrote:
>>>>>> >> On 3 October 2012 14:17, Matt Emmott <memmott at gmail.com> wrote:
>>>>>> >>>
>>>>>> >>> I believe that starting with 0.26 the mysql.txt is no longer used.
>>>>>> >>
>>>>>> >>
>>>>>> >> Thanks Matt.
>>>>>> >>
>>>>>> >> Your quite right and I remember reading about this on the list, just
>>>>>> >> couldn't find the threads.
>>>>>> >>
>>>>>> >> So I looked in config.xml as well, replacement for mysql.txt.  The
>>>>>> >> password
>>>>>> >> was wrong in there, so I updated that, but still the same error
>>>>>> >> message.  I
>>>>>> >> also tried some different "host" values (127.0.0.1, 192.168.10.12,
>>>>>> >> localhost), but that didn't help either.
>>>>>> >>
>>>>>> >> Cheers
>>>>>> >
>>>>>> > it's a packaging issue with Ubuntu. you have to manually edit the
>>>>>> > post-install script for the mythdatabase package with your specific
>>>>>> > information. I put it in manually as I didn't want to take the time to
>>>>>> > figure out how they're "extracting" the info. It's really quite
>>>>>> > annoying.
>>>>>> >
>>>>>> >
>>>>>> > --
>>>>>> > Steve
>>>>>> > http://www.mythtv.org/wiki/User:Steveadeff
>>>>>> > Before you ask, read the FAQ!
>>>>>> > http://www.mythtv.org/wiki/Frequently_Asked_Questions
>>>>>> > then search the Wiki, and this list,
>>>>>> > http://www.gossamer-threads.com/lists/mythtv/
>>>>>> > Mailinglist etiquette -
>>>>>> > http://www.mythtv.org/wiki/Mailing_List_etiquette
>>>>>> > _______________________________________________
>>>>>> > mythtv-users mailing list
>>>>>> > mythtv-users at mythtv.org
>>>>>> > http://www.mythtv.org/mailman/listinfo/mythtv-users
>>>>>>
>>>>>>
>>>>>> I'm completely unable to reproduce the issue using a fresh 12.04.1
>>>>>> install (upgraded using default repos), enabling 0.26 repo, then doing
>>>>>> an upgrade there. So it would seem to me that it is not a packaging
>>>>>> issue. The code you are questioning is as follows
>>>>>>
>>>>>>
>>>>>> CONFIG=/etc/mythtv/config.xml
>>>>>> if [ -e $CONFIG ]; then
>>>>>>     db_set mythtv/mysql_mythtv_dbname "`xpath  -q -e
>>>>>> 'string(//DBName)' $CONFIG 2>/dev/null`"
>>>>>>     db_set mythtv/mysql_mythtv_user "`xpath  -q -e
>>>>>> 'string(//DBUserName)' $CONFIG 2>/dev/null`"
>>>>>>     db_set mythtv/mysql_mythtv_password "`xpath  -q -e
>>>>>> 'string(//DBPassword)' $CONFIG 2>/dev/null`"
>>>>>>     db_set mythtv/mysql_host "`xpath  -q -e 'string(//DBHostName)'
>>>>>> $CONFIG 2>/dev/null`"
>>>>>> fi
>>>>>>
>>>>>>
>>>>>> Which says to read the /etc/mythtv/config.xml file and set the value
>>>>>> to what is returned (and throw away error messages). So if you run the
>>>>>> following commands and don't get returns of your DBName, DBUserName,
>>>>>> DBPassword, and DBHostName, then there is something wrong with your
>>>>>> config.xml file.
>>>>>>
>>>>>> xpath  -q -e 'string(//DBName)' /etc/mythtv/config.xml 2>/dev/null
>>>>>> xpath  -q -e 'string(//DBUserName)' /etc/mythtv/config.xml 2>/dev/null
>>>>>> xpath  -q -e 'string(//DBPassword)' /etc/mythtv/config.xml 2>/dev/null
>>>>>> xpath  -q -e 'string(//DBHostName)' /etc/mythtv/config.xml 2>/dev/null
>>>>>>
>>>>>>
>>>>>> For instance, on this VM I just setup, I get
>>>>>>
>>>>>> thomas at tmashos-testboxen5:~$ xpath  -q -e 'string(//DBName)'
>>>>>> /etc/mythtv/config.xml 2>/dev/null
>>>>>> mythconverg
>>>>>> thomas at tmashos-testboxen5:~$ xpath  -q -e 'string(//DBUserName)'
>>>>>> /etc/mythtv/config.xml 2>/dev/null
>>>>>> mythtv
>>>>>> thomas at tmashos-testboxen5:~$ xpath  -q -e 'string(//DBPassword)'
>>>>>> /etc/mythtv/config.xml 2>/dev/null
>>>>>> Nal0pMRh
>>>>>> thomas at tmashos-testboxen5:~$ xpath  -q -e 'string(//DBHostName)'
>>>>>> /etc/mythtv/config.xml 2>/dev/null
>>>>>> localhost
>>>>>> thomas at tmashos-testboxen5:~$
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Thomas Mashos
>>>>>> _______________________________________________
>>>>>> mythtv-users mailing list
>>>>>> mythtv-users at mythtv.org
>>>>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>>>>
>>>>>
>>>>>
>>>>> It bit me big time and is the exact error in the start of this thread.
>>>>> 12.04.1 LTS.  Still haven't got it to work....
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> mythtv-users mailing list
>>>>> mythtv-users at mythtv.org
>>>>> http://www.mythtv.org/mailman/listinfo/mythtv-users
>>>>>
>>>>
>>>> Did you verify that the 4 commands I posted return appropriate values?
>>>> Did you test logging into mysql with all 4 of those values?
>>>>
>>>> Thanks,
>>>>
>>>> Thomas Mashos
>>>
>>> I wonder if it has to do with /etc/mythtv/config.xml not being "upgraded"?
>>>
>>
>> Ok, now you're just guessing. That doesn't make any sense, your DB
>> credentials don't change during an upgrade, so there wouldn't be any
>> reason to "upgrade" the file. Further, as I've said before, on a clean
>> install the upgrade works fine, so it's something specific to your
>> system.
>>
>> I'll ask again, this time to you. Did you verify that the 4 commands I
>> posted return appropriate values? Did you test logging into mysql with
>> all 4 of those values?
>>
>> If I were to guess what may have happened, it's that at some point in
>> the past you reset your DB info and didn't update
>> /etc/mythtv/config.xml, and because mythtv no longer uses mysql.txt in
>> 0.26 you are just now seeing the issue on package upgrade.
>>
>> Thanks,
>>
>
> $ more /etc/mythtv/config.xml
> <Configuration>
>   <Database>
>     <PingHost>1</PingHost>
>     <Host>127.0.0.1</Host>
>     <UserName>mythtv</UserName>
>     <Password>MX0mYIpH</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>
>
>
> I never reset the DB info. the time stamp of my config.xml file is
> from before my upgrade to 0.26, so that is what was in there before
> and everything worked fine.
>
> I'm going to try renaming the field names to what you show as being
> what they should be and see if that fixes things.
>

upgrade went fine this time, however, I still get this:

Oct  5 19:04:31 MythCenter mythlogserver: mythbackend[29430]: E
CoreContext mythdbcon.cpp:217 (OpenDatabase) Driver error was
[1/1045]:#012QMYSQL: Unable to connect#012Database error
was:#012Access denied for user 'mythtv'@'localhost' (using password:
YES)

mysql -u mythtv -p mythconverg
using the password in config.xml works fine however.

-- 
Steve
http://www.mythtv.org/wiki/User:Steveadeff
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette - http://www.mythtv.org/wiki/Mailing_List_etiquette


More information about the mythtv-users mailing list