mythtv-setup: unable to connect to database
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mythtv (Ubuntu) |
Fix Released
|
Undecided
|
Dustin Kirkland |
Bug Description
Binary package hint: mythtv-backend
$ dpkg -l mythtv-backend
ii mythtv-backend 0.21.0+fixes16838-0 A personal video recorder application (server)
$ lsb_release -rd
Description: Ubuntu 8.04
Release: 8.04
what happens - I cannot complete the configuration of mythtv with mythtv-setup. This appears to be because the mysql database is not fully populated.
what should happen - I should be able to set up mythtv.
Background information
$ id
uid=1000(vjm) gid=1000(vjm) groups=
$ sudo /etc/init.d/mysql status
* /usr/bin/mysqladmin Ver 8.41 Distrib 5.0.51a, for debian-linux-gnu on i486
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 5.0.51a-3ubuntu5.1
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/
Uptime: 1 hour 25 min 56 sec
Threads: 1 Questions: 43 Slow queries: 0 Opens: 23 Flush tables: 1 Open tables: 17 Queries per second avg: 0.008
$ ps -fade|grep myth
mythtv 8983 1 0 22:22 ? 00:00:06 /usr/bin/
vjm 9178 6809 0 22:34 pts/0 00:00:00 grep myth
What I tried to do:
$ mythtv-setup
(I get a popup asking to close any running mythbackends. I say OK)
(I get a small xterm with error messages in it, saying unable to connect to database.
Could not capture this for you, because a fullscreen display suddenly appears)
The fullscreen display prompts for things like database name, user , password.
I left these as defaults, and hit <return> immediately.
(Oh, and it shows "No UPnP devices available", to which I say "OK" since there is nothing else to say.
On the original terminal I get:
* Stopping MythTV server: mythbackend [ OK ]
* Restarting MythTV server: mythbackend No /usr/bin/
(I get another popup, would you like to run mythfilldatabase?) <cancel>
yet, I am able to connect to mysql as mythv@localhost, with no password.
$ mysql -u mythtv@localhost
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 87923
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+------
| Database |
+------
| information_schema |
+------
1 row in set (0.00 sec)
mysql> use mythconverg;
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mythconverg'
mysql> quit
Bye
I checked for .my.cnf files and so forth, could find none in my home dir nor in /home/mythtv.
The closest thing was the .mythtv/mysql.txt file;
$ grep -v ^# /home/mythtv/
DBHostName=
DBHostPing=no
DBUserName=mythtv
DBName=mythconverg
DBType=
DBPassword=0ciB7wRh
$ sudo dpkg-reconfigure mythtv
< does nothing.>
$ sudo dpkg-reconfigure mythtv-backend
<answer NO to create v4l device nodes>
Then it asks me to run mythtv-setup. oh. Well that's going to be a problem.
Then I have to start mythtv-backend again.
Try that anyway:
$ /etc/init.
$ /etc/init.
(no errors, let's stop again)
$ /etc/init.
$ mythtv-setup
does not seem to help.
Related branches
Changed in mythtv: | |
assignee: | nobody → kirkland |
Changed in mythtv: | |
status: | New → In Progress |
I tried a complete purge/reinstall cycle.
$ sudo aptitide --purge remove mythtv
$ sudo aptitude --purge remove mythtv-backend
$ sudo aptitude --purge remove mythtv-frontend
$ sudo aptitude --purge remove mythtv-common
$ sudo aptitude update
$ sudo aptitude upgrade
$ sudo aptitude install mythtv
$ mythtv-setup
I get the same behaviour.
NB: If I say OK to the "mythfilldatabase" popup prompt, I got the fllowing in an xterm titled "running mythfilldatabase" @'localhost' (using password: YES)
-------------
2008-06-27 23:12:05.490 Using runtime prefix = /usr, libdir = /usr/lib
2008-06-27 23:12:05.491 Using localhost value of wellington
2008-06-27 23:12:05.497 New DB connection, total: 1
2008-06-27 23:12:05.500 Unable to connect to database!
2008-06-27 23:12:05.500 Driver error was [1/1045]:
QMYSQL3: Unable to connect
Database error was:
Access denied for user 'mythtv'
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-06-27 23:12:05.550 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
QServerSocket: failed to bind or listen to the socket
2008-06-27 23:12:05.601 MCP::InitUPnP() - HttpServer Create Error
2008-06-27 23:12:05.601 Deleting UPnP client...
2008-06-27 23:12:05.601 No UPnP backends found
No UPnP backends found
Would you like to configure the database connection now? [yes] @'localhost' (using password: YES)
Database host name: [localhost]
Should I test connectivity to this host using the ping command? [yes]
Database non-default port: [0]
Database name: [mythconverg]
Database user name: [mythtv]
Database password: [0ciB7wRh]
Unique identifier for this machine (if empty, the local host name will be used): [wellington]
Would you like to use Wake-On-LAN to retry database connections? [no]
2008-06-27 23:13:31.942 Unable to connect to database!
2008-06-27 23:13:31.942 Driver error was [1/1045]:
QMYSQL3: Unable to connect
Database error was:
Access denied for user 'mythtv'
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-06-27 23:13:31.993 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2008-06-27 23:13:32.043 Cannot login to database?
2008-06-27 23:13:32.043 Cannot login to database?
Cannot login to database?
Would you like to configure the database connection now? [yes]
------------
and so on, endlessly...