[mythtv-users] i need some myth-database sql help

bassem bassem at sonic.net
Thu Feb 19 14:54:08 EST 2004


* Bill Bradley <wbradley at bham.rr.com> [2004-02-19 07:18]:
> Hmmm...are you running this on the frontend or the backend?
>
I'm running this from the backend. Surprisingly, everything seems to work OK,
with myth (i.e. i can schedule recording, view old recordings etc..., and
the frontend connects with no problem).
However, it's irritating every time i run apt because it complains that
myth-database is not installed correctly.

> It looks like the install script is trying to connect as root to your mysql 
> server with a password.  Unless you have changed it, mysql ships with no 
> password set on the root account.  Meaning if you try and connect as root 
> using a password it wont work.
>

I have changed the root password, and i'm able to connect with no problems
from the shell ?
/home/myth# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 55 to server version: 4.0.17

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
I'm at a little loss why dpkg-reconfigure --force mythtv-database fails
to connect using the same user/password.
However, i did notice that dpkg tries to connect to root at hostname.mydomain
whereas doing it from the shell connects to root at localhost.
It appears that i messed up DBHostName somewhere.
What values should i have for the mysql.txt for the DBHostName, in 
/etc/mythtv/mysql.txt, $HOME/.mythtv/mysql.txt.

However, i did manage to hack /var/lib/dpkg/info/mythtv-database.postinst
and change the host to localhost and that seems to have fixed it.

thanks for the help, i appreciate it.
regards,
Bassem
> rpGMQkKk is the encrypted password (of "mythtv' i believe).  Dont reinstall 
> mysql, just check out your mythtv directories and look for the sql scripts 
> that build the database.  If you cant find them do a <find / -name "*.sql"> 
> or just download the source from mythtv.org and the sql scripts are in there.  
> Once you have the scripts you can rebuild the db from scratch:
> 
> mysqladmin create mythconverg
> 
> then
> 
> mysql mythconverg < scriptname.sql...etc for each part of myth.
> 
> You will have to rerun mythsetup after doing this btw because this will blow 
> out any setting you had before...
> 
> You may also want to check your privileges and grant privileges to all users 
> on your subnet. not good security practice..but what the hey, you can lock it 
> down after you get it working.
> 
> One final note...If you already have a working mythconverg db, you will want 
> to do a mysqldump -c mythconverg > myth.sql to get all your db info backed 
> up.
> 
> Hope this helps somewhat.
> 
> On Wednesday 18 February 2004 07:12 pm, bassem wrote:
> > Hello,
> > I've been struggling with this issue, my sql knowledge is pretty weak.
> > Here's the problem:
> > I've been using myth CVS and decided the easier way to use the Debian 0.14
> > packages to match my frontend.
> > For the life of me i can't get myth-database to install correctly.
> > Here's the error that i get when i try to install:
> > dpkg-reconfigure --force mythtv-database
> >
> > Failed to connect to database: Access denied for user: 'root@<domainname>'
> > (Using password: YES) at -e line 5, <> line 1. Failed to create database
> > (incorrect admin username/password?)
> > If you supplied incorrect information, try:
> > dpkg-reconfigure --force mythtv-database
> >
> > I have tried all the passwords that i ever used and i still can't get it to
> > work.
> >
> > Now, my mysql.txt specifies :
> > DBHostName=localhost
> > DBUserName=mythtv
> > DBPassword=mythtv
> > DBName=mythconverg
> >
> > # Set the following if you want to use something other than the
> > # machine's real hostname for identifying settings in the database.
> > # This is useful if your hostname changes often, as otherwise
> > # you'll need to reconfigure mythtv (or futz with the DB) every time.
> > # TWO HOSTS MUST NOT USE THE SAME VALUE
> > #
> > #LocalHostName=my-unique-identifier-goes-here
> > LocalHostName=10.15.71.102
> >
> > When i try mythtv/mythtv user/password i get the following:
> > Failed to execute SQL: GRANT ALL PRIVILEGES ON mythconverg.* TO
> > mythtv at localhost IDENTIFIED BY 'rpGMQkKk'\nAccess denied for user:
> > 'mythtv@%' to database 'mythconverg' at -e line 8, <> line 1.
> >
> > I have no idea what rpGMQkKk is ? and i don't know how to change it.
> >
> > Can someone please show me the errors of my way ? My last resort to to
> > reinstall mysql from scratch which will be painfull.
> >
> > Any help will be greatly appreciated,
> > Bassem
> _______________________________________________
> 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