[mythtv-users] Database setup

Michael Nguyen michaeln at twentyten.org
Sun Mar 23 01:54:32 UTC 2008


Harry Devine wrote:

[snip]
> The only way that I could connect to the DB  in mythtv-setup was to 
> change the username and password to root (and it's password).  It 
> wouldn't work using the mythtv user.  I know that using root is probably 
> not optimal, so that's part of the reason why I'd like to completely 
> scrap the mythconverg database and start over with it.  Also, I entered 
> the command that you listed above, and it gave me "Access denied for 
> user 'mythtv'@'192.168.1.200' (using password: YES)".
>   
Right, Harry.  The problem is that your user "mythtv" is only allowed to 
connect via "localhost".  If you typed this:

mysql -umythtv -pmythtv -hlocalhost

You'd get a MySQL prompt.  If you type this:

mysql -umythtv -pmythtv -h192.168.1.200

You'll get the error you saw.  The point of the previous entries was to 
allow connections for user "mythtv" from locations other than localhost 
hence the two SQL commands.  So again.

1) Get a MySQL prompt (login as root on MySQL:   mysql -uroot -p )
2) Run those MySQL queries

USE mysql;
GRANT ALL ON mythconverg.* TO mythtv@'%' IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@'%' IDENTIFIED 
BY "mythtv";
FLUSH PRIVILEGES;

It'll magically work.  Dropping mythconverg and recreating it won't fix 
this problem.  The problem is a MySQL access problem, not a MythTV 
problem.  The default MythTV setup creates a user with "localhost" 
access.  If you're going to connect from somewhere other than localhost, 
you need to allow for that connection.


Michael


More information about the mythtv-users mailing list