[mythtv-users] Database setup

Mike Perkins mikep at randomtraveller.org.uk
Mon Mar 24 18:13:00 UTC 2008


Harry Devine wrote:
> Michael Nguyen wrote:
>>
>> The default configuration connects to "localhost" so you must not be 
>> connecting to localhost for your database.  Do the following:
>>
>> mysql -uroot
>>
>> GRANT ALL ON mythconverg.* TO mythtv@'%' IDENTIFIED BY "mythtv";
>> FLUSH PRIVILEGES;
>> GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@'%' 
>> IDENTIFIED BY "mythtv";
>> FLUSH PRIVILEGES;
>> \q
>>   
> Nope, no good.  As soon as I enter "mysql -uroot" I get "Access denied 
> for user 'root'@'localhost' (using password: NO)".  I was looking around 
> the 'Net in the meantime and saw some advice somewhere that mentioned a 
> SQL command to put the appropriate IP address into the DB.  That seemed 
> to work, as I was able to just do a mythtv-setup.  However, when I went 
> to the General screen, I had to change the user and password to root and 
> root's password.  It was prefilled with mythtv.  I'm guessing that this 
> isn't correct.
> 
> Anyway, it appears to me that something's outta whack here.  I don't 
> really want to get too far into my setup and have to scrap it all and 
> start over.  Now is the perfect time for me since I'm re-doing 
> everything from scratch, so I'd rather take the time and get it right 
> the first time, ya know?
> 

If you weren't able to do the above commands, how were you able to enter an "SQL 
command to put the appropriate IP address into the DB"? Because that's *exactly* 
what the above commands do.

Please note: There's a difference in connecting to mysql as:

user at hostname# mysql -uroot
 >

user at hostname# mysql -uroot -p
 >

- where there is no password, and where there is a password and it's empty. Also 
note: the mysql root password does not have to be, and is usually not, the same 
as the user root's password on the machine. On most home networks it's 
reasonably safe to leave the mysql root password as blank for convenience[1].

If your mysql root password's screwed or you can't remember it, there are 
explicit instructions in the Mysql manuals on ways to fix it: unfortunately it's 
a massive document which can take some searching.

When I first started in this business I downloaded it (pdf) and had it open to 
the relevant section on another computer as I waded through the Mythtv install 
instructions. Saved a lot of grief.

Mike Perkins

[1] YMMV. I am reasonable content with my security measures, but I've been in 
the business a while. You can start off light, then tighen down after you have 
got things rolling.


More information about the mythtv-users mailing list