<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><br><div>> Date: Sat, 21 Feb 2015 11:18:55 -0600<br>> From: keemllib@gmail.com<br>> To: mythtv-users@mythtv.org<br>> Subject: Re: [mythtv-users] cannot restore database<br>> <br>> On 02/21/2015 10:53 AM, UB40D wrote:<br>> ...<br>> > I hate when they give you a relative path in the error message. Where the<br>> > hell is that ./mythconverg/ it can't rmdir? Is it that it can't rmdir<br>> > because it doesn't have permission to it, or because it's not there? If the<br>> > latter, what's the bit of database that still exists when the script fails<br>> > to create the database?<br>> ><br>> > find / -name mythconverg -print<br>> ><br>> > gives nothing (other than the usual annoying bunch of "permission denied"<br>> > on /proc etc)<br>> <br>> Because the directory is owned and only read/write by user mysql. If you<br>> do a: sudo before the find, you'll see it. Or, the following will tell<br>> you where it is:<br>> <br>>      $ cd /etc/mysql;grep datadir my.cnf conf.d/*<br>> <br>>        my.cnf:datadir = /var/lib/mysql<br>> <br>> -- <br>> Bill<br>> ___</div><div><br></div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">Do the database parameters
in ~/.mythtv/config.xml and /home/mythtv/.mythtv/config.xml match?<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">Did you try a database
repair first?<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">/usr/share/doc/mythtv-backend/contrib/maintenance/optimize_mythdb.pl<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">Where is your backup?   It might be specified in </span><span style="font-size:10.0pt;font-family:"Courier New"">/home/phil/.mythtv/backuprc</span><span style="font-size:11.0pt;font-family:"Courier New""> <o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">I stop backend first and specify
the directory like this:<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">sudo stop mythtv-backend<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">/usr/share/mythtv/mythconverg_restore.pl\<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">      --drop_database --create_database\<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">      --directory /var/lib/mythtv/db_backups\<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">      --filename
mythconverg-1214-20080626150513.sql.gz<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">sudo start mythtv-backend<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">Then run find_orphans.py<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""> </span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">HTH<o:p></o:p></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New"">Phil<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Courier New""><br></span></p></div>                                           </div></body>
</html>