[mythtv-users] New install, can't restore database with mythconverg_restore.pl - mysql access denied

Kingsley Turner krt at krt.com.au
Wed Oct 8 09:10:17 UTC 2014


On 08/10/14 19:59, Kingsley Turner wrote:
> On 08/10/14 18:09, Mark Perkins wrote:
>>
>>> On 8 Oct 2014, at 4:13 pm, "Kingsley Turner" <krt at krt.com.au> wrote:
>>>
>>> Hi-yas,
>>>
>>> I had so much trouble after a mythbuntu 12.04->14.04 update I've 
>>> re-installed.
>>>
>>> However I can't seem to get my database restored:
>>>
>>>    # mythconverg_restore.pl --drop_database --create_database 
>>> --directory . --filename mythconverg-1317-20141008051044.sql.gz
>>>    ERROR 1045 (28000): Access denied for user 'mythtv'@'localhost' 
>>> (using password: YES)
>>>    ERROR: Cannot write to mysql, stopped at 
>>> /home/kingsley/Bin/mythconverg_restore.pl line 1720, <BACKUP> line 793.
>>>
>>> Huh?
>>>
>>> It's just using the password out of /home/mythtv/.mythtv/config.xml AFAIK.
>>> (this is the same as the default user .mythtv/config.xml)
>> The verbose log says /home/kingsley/.mythtv/config.xml
>>
>
> Yeah, but the <Database> entry is the same in each ~
>
>   <Database>
>     <PingHost>1</PingHost>
>     <Host>localhost</Host>
>     <UserName>mythtv</UserName>
>     <Password>2xCsPIsh</Password>
>     <DatabaseName>mythconverg</DatabaseName>
>     <Port>3306</Port>
>   </Database>
>

The restore script eventually executes:

     'mysql' --defaults-extra-file='/tmp/bvNAj5Df0K' --host='localhost' 
--port='3306' --user='mythtv' 'mythconverg'

I modified the restore script so that it no longer nuked it's tmpfile on exit.
I checked the content of this, and it indeed has the correct password.

So I again modified the restore script so instead of adding 
--defaults-extra-file='/tmp/bvNAj5Df0K' it added --password=2xCsPIsh and it 
worked.

I can't explain why mysql does not work with the defaults file, but I'm 
happy to have my database restored.

thanks,
-kt



More information about the mythtv-users mailing list