[mythtv-users] Mysql permissions problem

Michael Tiller michael.tiller at gmail.com
Mon May 17 20:53:39 UTC 2010


I'm having a mysql permissions problem.  I know "the usual" way to deal with
this, but it doesn't seem to be working for me in the case.  Here is a log
of an interaction with mysql.  I don't really understand how I can possibly
get an error in the last command.  If anybody sees what I'm missing, please
let me know:

First, I start by just demonstrating the problem:

mtiller at mythtv:/home/mythtv/.mythtv$ *mysql -h192.168.11.110 -umythtv -p*
Enter password:
ERROR 1045 (28000): Access denied for user 'mythtv'@'mythtv' (using
password: YES)

Note the host in that case is by IP address.  I'm trying to access it that
way because I want to be able to access it through my LAN and I'm simulating
the LAN access problems I've been having.  Note that everything is fine if I
access it via localhost, e.g.

mtiller at mythtv:/home/mythtv/.mythtv$ *mysql -hlocalhost -umythtv -p*
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1342
Server version: 5.1.41-3ubuntu12 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

mysql>

So this looks like a permissions issue so I get in as root and grant some
pretty broad permissions:

mtiller at mythtv:/home/mythtv/.mythtv$ *mysql -hlocalhost -uroot -p*
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1042
Server version: 5.1.41-3ubuntu12 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

mysql> *grant all on mythconverg.* to mythtv@"%" identified by "mythtv";*
Query OK, 0 rows affected (0.00 sec)

mysql> *flush privileges;*
Query OK, 0 rows affected (0.00 sec)

mysql> Bye

I must be missing something because I would then expect this to work, but it
doesn't:

mtiller at mythtv:/home/mythtv/.mythtv$ *mysql -h192.168.11.110 -umythtv -p*
Enter password:
ERROR 1045 (28000): Access denied for user 'mythtv'@'mythtv' (using
password: YES)

I even tried specifying the database in case that was the issue:

mtiller at mythtv:/home/mythtv/.mythtv$ *mysql -h192.168.11.110 -umythtv -p
mythconverg*
Enter password:
ERROR 1045 (28000): Access denied for user 'mythtv'@'mythtv' (using
password: YES)

There doesn't seem to be any issue with the command.  It seems to be pretty
clear that this is an authorization issue.  I just don't understand why
since I allow the user "mythtv" from anywhere so why should changing the
host make a difference?

This is definitely the local machines IP address, e.g.

eth0      Link encap:Ethernet  HWaddr 90:fb:a6:4d:a5:fd
          inet addr:192.168.11.110  Bcast:192.168.11.255  Mask:255.255.255.0

Furthermore, I've tried changing /etc/mysql/my.cnf to change the bind
address.  I've tried commenting out and explicitly setting it to 127.0.0.1,
0.0.0.0 and 192.168.11.110 (with a restart after every change).  There is no
"skip-networking" option in my.cnf (anymore), that is why I'm messing with
bind-address.

I'm hoping a second set of eyes (or somebody who knows more about MySQL
security) can spot what I'm missing.  Thanks.

--
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20100517/76fcdd2a/attachment.htm>


More information about the mythtv-users mailing list