[mythtv-users] Debian install SQL problems

Lorrin Nelson lhn-public at the-fam.net
Fri Oct 3 20:31:04 EDT 2003


Hey Ray, thanks for the detailed help. I'm good to go now, though still 
confused. It turns out the original
	cat <<EOF | sed -e "s/'/\\\\'/g"
is correct. I made the change you suggested and got a new error:

syntax error at -e line 4, near "'GRANT ALL PRIVILEGES ON mythconverg.* 
TO mythtv at localhost IDENTIFIED BY ';"
Bad name after WJY' at -e line 4.

After some messing around, I had an aha moment: my password now is 
aXnyTWJY but had been ;Xny)WJY. Surely the reason for the last three 
characters of the password showing up in the error message alone must be 
that the old password with the ) was still being used!

Why hadn't this worked before?
     apt-get --purge remove mythtv-database
     apt-get install mythtv-database

Beats me. But this time I also did a purge of mythtv-common, reinstalled 
both and it worked.

Thanks again to you and Daniel for all the help!

-Lorrin


ray cielencki wrote:

> let me preface this by saying that this is just a guess...
> 
> i downloaded the deb from 
> http://dijkstra.csh.rit.edu/~mdz/debian/dists/woody/mythtv/binary-all/mythtv-database_0.11-1_all.deb 
> and extracted it with 'ar x mythtv-database_0.11-1_all.deb'. the code 
> that you are talking about is in the postinst file of the control.tar.gz 
> archive.
> 
> it looks like the deb is trying to double escape the '
> 
> escape_quotes() {
>     cat <<EOF | sed -e "s/'/\\\\'/g"
> $1
> EOF
> }
> 
> i'd bet that editing the escape_quotes sub to read
>     cat <<EOF | sed -e "s/'/\\'/g"
> would fix this issue. it would make sense that there be one escape for 
> the shell, but the second one doesn't seem necessary since the perl 
> one-liner uses double quotes and this may be messing it up when it hits 
> mysql, much the same as trying to:
> select * from program where title=\'Cowboy Bebop\';
> 
> theres also a lot of good info about debs at 
> http://www.kclee.com/clemens/unix/HowToCreateYourOwnDebianPackage.html
> 
> cheers,
> rayc
> 
> At 12:56 10/02/2003, you wrote:
> 
>> Hi - Has anyone run the Debian installers recently? I'm having trouble 
>> installing mythtv-database -- during the configure step, I get this 
>> error and it aborts:
>>
>>
>> Failed to execute SQL: GRANT ALL PRIVILEGES ON mythconverg.* TO 
>> mythtv at localhost IDENTIFIED BY '\nYou have an error in your SQL syntax 
>> near ''' at line 1 at -e line 8, <> line 1.
>>
>>
>> Could it be as simple a missing ' at the end of the SQL statement? I 
>> ran mysql by hand and executed
>>     GRANT ALL PRIVILEGES ON mythconverg.* TO mythtv at localhost 
>> IDENTIFIED BY '';
>> just fine, but that didn't help me complete the mythtv installation 
>> because it still tried to run the broken SQL statement. I'm pretty new 
>> to Debian, so maybe I'm missing something obvious.
>>
>> I'm pretty sure I installed an older version of this package just fine 
>> a few months ago during a previous attempt to set up MythTV.
>>
>> -Lorrin
>>
>> APT output:
>> spiff:/etc/apt# apt-get install
>> Reading Package Lists... Done
>> Building Dependency Tree... Done
>> 0 packages upgraded, 0 newly installed, 0 to remove and 0  not upgraded.
>> 2 packages not fully installed or removed.
>> Need to get 0B of archives. After unpacking 0B will be used.
>> Setting up mythtv-database (0.11-1) ...
>> Database 'mythconverg' on host 'localhost' already exists, skipping 
>> database initialization
>> Failed to execute SQL: GRANT ALL PRIVILEGES ON mythconverg.* TO 
>> mythtv at localhost IDENTIFIED BY '\nYou have an error in your SQL syntax 
>> near ''' at line 1 at -e line 8, <> line 1.
>> dpkg: error processing mythtv-database (--configure):
>>  subprocess post-installation script returned error exit status 255
>> dpkg: dependency problems prevent configuration of mythtv:
>>  mythtv depends on mythtv-database (= 0.11-1); however:
>>   Package mythtv-database is not configured yet.
>> dpkg: error processing mythtv (--configure):
>>  dependency problems - leaving unconfigured
>> Errors were encountered while processing:
>>  mythtv-database
>>  mythtv
>> E: Sub-process /usr/bin/dpkg returned an error code (1)
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



More information about the mythtv-users mailing list