[mythtv-users] Debian install SQL problems
ray cielencki
mythtv at rayslinky.com
Fri Oct 3 09:27:46 EDT 2003
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)
More information about the mythtv-users
mailing list