[mythtv-users] Kudos to mysql [was FINAL ANSWER: Can only connect to mysql as localhost]
digitalaudiorock at hotmail.com
Mon Aug 13 20:51:41 UTC 2007
>From: "Lan Barnes"
>On Sun, August 12, 2007 3:26 pm, Lan Barnes wrote:
> > Still needed some tweaking, and I want to record it for the lists:
> > 1. Needed to grant privileges on the BE IP addr to root in mysql. Yup,
> > root. Donno exactly why, but mythbackend was complaining about not being
> > able to connect to the database at startup. I thought root could do
> > anything, but apparently mysql doesn't agree.
>As I think about it, this is actually a sound design decision on the part
>of the mysql team. Allowing logins from a remote root is a no-no.
>Certainly it makes sense for a server to have a list of permitted IPs from
>which root may attach.
>Having these insights is the whipped cream on top of the Linux sundae. The
>weeks of thrashing about getting things to work is the eat your
To be honest with you, the whole issue you had there really confuses me.
Just to be clear, the frontend would never attempt to connect to mysql using
root unless the mysql.txt file expressly had root defined as the user. If
that were the case then yes, by default mysql would never have privileges
for remote root login. The other thing that really confused me was that, if
the frontend is being run by the logged in user 'mythtv', I can't imagine
anything ever using anything other than /home/mythtv/.mythtv/mysql.txt to
get the database login info. Getting my frontend to connect to the backend
(under Gentoo), it pretty much involved the following:
1. In the database (as the root mysql user):
GRANT ALL ON mythconverg.* TO mysql@'192.168.1.%' IDENTIFIED BY 'mysql';
2. When running the frontend for the fist time, it prompted for the database
login info and I entered it (which creates /home/mythtv/.mythtv/mysql.txt ).
...and that was it. The one thing I have seen that can get tricky is if the
backends my.cnf file has 'bind-address' set to 127.0.0.1 rather than the
machines lan address, it can prevent all remote connections to the database
Booking a flight? Know when to buy with airfare predictions on MSN Travel.
More information about the mythtv-users