[mythtv-users] How to control database settings from config.xml
Michael T. Dean
mtdean at thirdcontact.com
Thu Dec 22 22:27:44 UTC 2011
On 12/22/2011 05:04 PM, Per Hatlevik wrote:
>> ================ mythfrontend output without mysql.txt ================
>> 2011-12-22 21:28:45.101 mythfrontend version: [0.24.1-5.fc16 (e89d6a9f7e)] www.mythtv.org
>> 2011-12-22 21:28:45.101 Using runtime prefix = /usr
>> 2011-12-22 21:28:45.102 Using configuration directory = /home/göran/.mythtv
>> 2011-12-22 21:28:45.103 ThreadPool:HTTP: Initial 1, Max 25, Timeout 60000
>> 2011-12-22 21:28:48.360 Unable to read configuration file mysql.txt
>> 2011-12-22 21:28:48.360 Empty LocalHostName.
>> 2011-12-22 21:28:48.361 Using localhost value of mimmi
>> 2011-12-22 21:28:48.390 New DB connection, total: 1
>> 2011-12-22 21:28:48.739 Unable to connect to database!
>> 2011-12-22 21:28:48.739 Driver error was [1/1045]:
>> QMYSQL: Unable to connect
>> Database error was:
>> Access denied for user 'mythtv'@'localhost' (using password: NO)
> this seems like a problem to me. shouldn't the mythtv user be using a
> password in mysql (default to mythtv)?
This is a "default connect attempt" that MythTV is trying just because
it doesn't have valid connection information.
In truth, in 0.24-fixes and below, if you have a config.xml and no
mysql.txt, it will /always/ try a default connection. Only when that
fails will it then use the config.xml information. This was fixed in
unstable, so on 0.25, it will actually use the config.xml properly (and
before trying to use a default connection). So, basically, without a
mysql.txt, you will /always/ have a default connect attempt unless your
DB is on localhost and using the mythtv user and no password.
That said, the fact that there is a mysql server running on localhost
may get in the way of things... I haven't tested the broken 0.24-fixes
config.xml usage (with no mysql.txt) on a system with a
not-used-for-MythTV mysql server running...
> also, on some systems mysql may not be setup to listen for external
> network connections by default. i think on debian it defaults to
> listening on the loop back. check my.cnf (on my system this is
> /etc/mysql/my.cnf but your location could be different). you want to
> be sure that the bind-address parameter is set to a real ip address.
> by default on debian this looks like:
>
> # Instead of skip-networking the default is now to listen only on
> # localhost which is more compatible and is not less secure.
> bind-address = 127.0.0.1
>
> which would work for a combined BE/FE but would not let remote systems
> connect to mysql.
>
> you can always use the mysql client to test database connectivity
> outside of myth, get that working and then tackle the myth specific
> configuration.
Definitely good advice.
Mike
More information about the mythtv-users
mailing list