[mythtv-users] Debian install SQL problems
Daniel Quinlan
lists-mythtv-users at chaosengine.net
Fri Oct 3 11:06:32 EDT 2003
Quoting Lorrin Nelson <lhn-public at the-fam.net>:
> 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.
check the value of DBPassword in /etc/mythtv/mysql.txt
on my box it was (generated by pwgen)
DBPassword=(hk66Ew%
notice the unescaped (
when /usr/share/mythtv/mythsql sourced /etc/mythtv/mysql.txt it died
tv:/usr/share/mythtv $ ./mythsql
./mythsql: /etc/mythtv/mysql.txt: line 4: unexpected EOF while looking for
matching `)'
the quick fix is to change the password in /etc/mythtv/mysql.txt and redo the
GRANT
There's a diff below to hack mythsql to use sed instead of shell expansion.
not pretty but it works
regards,
Daniel
--- mythsql.orig 2003-10-03 09:57:13.000000000 +1000
+++ mythsql 2003-10-03 10:00:46.000000000 +1000
@@ -2,15 +2,8 @@
temp=$(tempfile)
-. /etc/mythtv/mysql.txt
-
-cat >$temp <<EOF
-[client]
-user=$DBUserName
-password=$DBPassword
-database=$DBName
-host=$DBHostName
-EOF
+echo '[client]' >$temp
+sed -e "`tail -4 $0`" < /etc/mythtv/mysql.txt >> $temp
set +e
mysql --defaults-extra-file=$temp
@@ -20,3 +13,8 @@
rm -f $temp
exit $ret
+# sed commands
+s/^DBUserName/user/
+s/^DBPassword/password/
+s/^DBName/database/
+s/^DBHostName/host/
More information about the mythtv-users
mailing list