Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

'database not open' problem

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


markknecht at gmail

May 14, 2007, 6:20 PM

Post #1 of 8 (1699 views)
Permalink
'database not open' problem

Hello,
In parallel with getting my server working I'm also trying to get
my remote machines upgraded and connecting over the network. Currently
they do not connect correctly.

1) From my remote frontend I can connect to the database by hand:

mark [at] lightnin ~ $ mysql -h 192.168.1.55 -u mythtv -p mythconverg
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 19
Server version: 5.0.40 Gentoo Linux mysql-5.0.40

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit
Bye
mark [at] lightnin ~ $

This makes me believe that the changes to allow connection over the
network have worked.

2) When mythfrontend tries to connect from the remote machine
lightning across the network to the backend it fails:


mark [at] lightnin ~ $ mythfrontend
2007-05-14 17:24:44.415 Using runtime prefix = /usr
2007-05-14 17:24:44.423 DPMS is active.
2007-05-14 17:24:44.423 Unable to read configuration file mysql.txt
2007-05-14 17:24:44.477 Trying to create a basic mysql.txt file
2007-05-14 17:24:44.477 Writing settings file /home/mark/.mythtv/mysql.txt
QSqlDatabase: QMYSQL3 driver not loaded
QSqlDatabase: available drivers:
2007-05-14 17:24:44.489 New DB connection, total: 1
2007-05-14 17:24:44.489 Unable to connect to database!
2007-05-14 17:24:44.489 No error type from QSqlError? Strange...
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2007-05-14 17:24:44.582 DB Error (KickDatabase):
Query was:
SELECT NULL;

I've read online that this is mainly due to the qt library not
having mysql support compiled in. I'm on Gentoo and beleive I do have
myswl support compiled in. Here's what I have loaded which does
include the mysql flag.

lightning ~ # emerge -pv qt

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] x11-libs/qt-4.2.3-r1 USE="cups dbus gif jpeg mysql
opengl png zlib -accessibility -debug -doc -examples (-firebird) -glib
-mng -nas -nis -odbc -pch -postgres -qt3support -sqlite -sqlite3
-xinerama" INPUT_DEVICES="-wacom" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
lightning ~ #

Since this is qt-4 I'm wondering if I also need qt3support?

Since qt takes quite a long time to compile I felt I'd ask first.

Thanks,
Mark
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


darrenmarshall at linuxfire

May 14, 2007, 9:18 PM

Post #2 of 8 (1621 views)
Permalink
Re: 'database not open' problem [In reply to]

On Tuesday 15 May 2007 10:50, Mark Knecht wrote:
> Hello,
> In parallel with getting my server working I'm also trying to get
> my remote machines upgraded and connecting over the network. Currently
> they do not connect correctly.
>
> 1) From my remote frontend I can connect to the database by hand:
>
> mark [at] lightnin ~ $ mysql -h 192.168.1.55 -u mythtv -p mythconverg
> Enter password:
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
> Welcome to the MySQL monitor. Commands end with ; or \g.
> Your MySQL connection id is 19
> Server version: 5.0.40 Gentoo Linux mysql-5.0.40
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql> quit
> Bye
> mark [at] lightnin ~ $
>
> This makes me believe that the changes to allow connection over the
> network have worked.
>
> 2) When mythfrontend tries to connect from the remote machine
> lightning across the network to the backend it fails:
>
>
> mark [at] lightnin ~ $ mythfrontend
> 2007-05-14 17:24:44.415 Using runtime prefix = /usr
> 2007-05-14 17:24:44.423 DPMS is active.
> 2007-05-14 17:24:44.423 Unable to read configuration file mysql.txt
> 2007-05-14 17:24:44.477 Trying to create a basic mysql.txt file
> 2007-05-14 17:24:44.477 Writing settings file /home/mark/.mythtv/mysql.txt
> QSqlDatabase: QMYSQL3 driver not loaded
> QSqlDatabase: available drivers:
> 2007-05-14 17:24:44.489 New DB connection, total: 1
> 2007-05-14 17:24:44.489 Unable to connect to database!
> 2007-05-14 17:24:44.489 No error type from QSqlError? Strange...
> QSqlQuery::exec: database not open
> QSqlQuery::exec: database not open
> 2007-05-14 17:24:44.582 DB Error (KickDatabase):
> Query was:
> SELECT NULL;
>
> I've read online that this is mainly due to the qt library not
> having mysql support compiled in. I'm on Gentoo and beleive I do have
> myswl support compiled in. Here's what I have loaded which does
> include the mysql flag.
>
> lightning ~ # emerge -pv qt
>
> These are the packages that would be merged, in order:
>
> Calculating dependencies... done!
> [ebuild R ] x11-libs/qt-4.2.3-r1 USE="cups dbus gif jpeg mysql
> opengl png zlib -accessibility -debug -doc -examples (-firebird) -glib
> -mng -nas -nis -odbc -pch -postgres -qt3support -sqlite -sqlite3
> -xinerama" INPUT_DEVICES="-wacom" 0 kB
>
> Total: 1 package (1 reinstall), Size of downloads: 0 kB
> lightning ~ #
>
> Since this is qt-4 I'm wondering if I also need qt3support?
>
> Since qt takes quite a long time to compile I felt I'd ask first.
>
> Thanks,
> Mark
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Check to see if mysql is network enabled first. In a console use netstat -l |
grep mysql to see if it's listening on port 3306. Inspect mysql config
(usually /etc/my.cnf ) to check the port number it's listening to and while
your there make sure "skip-networking" is disabled, delete the line or
#skip-networking then restart mysql.
You will also need to make sure the remote mythfrontend can find mythconverg
host, in mythfrontend setup use the ip address of mythconverg host computer
and a ~/user/.mythtv/mysql.txt file will be created.

goodluck
Darren


_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

May 14, 2007, 9:34 PM

Post #3 of 8 (1629 views)
Permalink
Re: 'database not open' problem [In reply to]

On 05/14/2007 09:20 PM, Mark Knecht wrote:
> 2) When mythfrontend tries to connect from the remote machine
> lightning across the network to the backend it fails:
>
>
...
> QSqlDatabase: QMYSQL3 driver not loaded
> QSqlDatabase: available drivers:
>
...
> I've read online that this is mainly due to the qt library not
> having mysql support compiled in. I'm on Gentoo and beleive I do have
> myswl support compiled in.

Not according to the error message above, "available drivers:" (with no
drivers listed).

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


markknecht at gmail

May 15, 2007, 7:12 AM

Post #4 of 8 (1621 views)
Permalink
Re: 'database not open' problem [In reply to]

On 5/14/07, Darren <darrenmarshall [at] linuxfire> wrote:
><SNIP>
>
> Check to see if mysql is network enabled first. In a console use netstat -l |
> grep mysql to see if it's listening on port 3306. Inspect mysql config
> (usually /etc/my.cnf ) to check the port number it's listening to and while
> your there make sure "skip-networking" is disabled, delete the line or
> #skip-networking then restart mysql.
> You will also need to make sure the remote mythfrontend can find mythconverg
> host, in mythfrontend setup use the ip address of mythconverg host computer
> and a ~/user/.mythtv/mysql.txt file will be created.
>
> goodluck
> Darren
>

Hi Darren,
Thanks for the response. It seems that mysql is listening but I see
no evidence that it's listening on port 3306. Most likely this is the
problem but I don't see what's wrong about the setup on the backend
server.

(NOTE: I do have the backend server running more or less correctly at
this point. I can view LiveTV and do recordings on both tuners. Only
KTVU, Channel 2, is not working for some reason in Myth even though
it's working fine at the command line.)

dragonfly ~ # /etc/init.d/mysql stop
* Stopping mysql ...
* Stopping mysqld (0)
[ ok ]
dragonfly ~ # netstat -l | grep mysql
dragonfly ~ # /etc/init.d/mysql status
* status: stopped
dragonfly ~ # /etc/init.d/mysql start
* Starting mysql ...
* Starting mysql (/etc/mysql/my.cnf)
[ ok ]
dragonfly ~ # netstat -l | grep mysql
tcp 0 0 Dragonfly:mysql *:* LISTEN
unix 2 [ ACC ] STREAM LISTENING 104813
/var/run/mysqld/mysqld.sock
dragonfly ~ #

From my.cnf it seems that I have the settings I found on the Gentoo
Wiki and that I think you are talking about:

# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/run/mysqld/mysqld.sock

# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
[mysqld]
character-set-server = utf8
default-character-set = utf8
user = mysql
port = 3306
socket = /var/run/mysqld/mysqld.sock
pid-file = /var/run/mysqld/mysqld.pid
log-error = /var/log/mysql/mysqld.err
basedir = /usr
datadir = /var/lib/mysql
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
language = /usr/share/mysql/english
#expire_logs_days = 7

# security:
# using "localhost" in connects uses sockets by default
# skip-networking
bind-address = 192.168.1.55
port = 3306

#log-bin
server-id = 1

My .mythtv/mysql.txt file has this:

DBHostName=192.168.1.55
DBUserName=mythtv
DBPassword=mythtv
DBName=mythconverg
DBType=QMYSQL3

That seems correct enough. I've deleted it and let Myth regenerate it
and it comes back the same.

Any ideas what's wrong with talking to the server?

Thanks,
Mark
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


markknecht at gmail

May 15, 2007, 7:16 AM

Post #5 of 8 (1624 views)
Permalink
Re: 'database not open' problem [In reply to]

On 5/14/07, Michael T. Dean <mtdean [at] thirdcontact> wrote:
> On 05/14/2007 09:20 PM, Mark Knecht wrote:
> > 2) When mythfrontend tries to connect from the remote machine
> > lightning across the network to the backend it fails:
> >
> >
> ...
> > QSqlDatabase: QMYSQL3 driver not loaded
> > QSqlDatabase: available drivers:
> >
> ...
> > I've read online that this is mainly due to the qt library not
> > having mysql support compiled in. I'm on Gentoo and beleive I do have
> > myswl support compiled in.
>
> Not according to the error message above, "available drivers:" (with no
> drivers listed).
>
> Mike

Hi Mike,
I don't follow. OK, I see that there are no drivers listed. Do I
need to recompile Myth again?

I also have 2 versions of qt installed in slots. Both report having
mysql support.

mark [at] lightnin ~ $ eix -I x11-libs/qt
[I] x11-libs/qt
Available versions:
(3) 3.3.4-r8 3.3.8-r2
(4) 4.2.3-r1 ~*4.3.0_beta1 ~4.3.0_rc1

{accessibility cups dbus debug doc examples firebird gif glib
immqt immqt-bc input_devices_wacom ipv6 jpeg mng mysql nas nis odbc
opengl pch png postgres qt3support sqlite sqlite3 ssl tiff xinerama
zlib}

Installed versions: 3.3.8-r2(3)(09:05:22 PM 04/18/2007)(cups
-debug -doc -examples -firebird gif -immqt -immqt-bc ipv6 mysql -nas
-nis -odbc opengl -postgres -sqlite -xinerama)

4.2.3-r1(4)(07:42:10 PM
05/14/2007)(-accessibility cups dbus -debug -doc -examples -firebird
gif -glib -input_devices_wacom jpeg -mng mysql -nas -nis -odbc opengl
-pch png -postgres qt3support -sqlite -sqlite3 -xinerama zlib)

Homepage: http://www.trolltech.com/
Description: The Qt toolkit is a comprehensive C++
application development framework.

mark [at] lightnin ~ $

I guess I'll rebuild Myth again and see if that helps.

- Mark
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

May 15, 2007, 8:13 AM

Post #6 of 8 (1605 views)
Permalink
Re: 'database not open' problem [In reply to]

On 05/15/2007 10:16 AM, Mark Knecht wrote:
> On 5/14/07, Michael T. Dean <mtdean [at] thirdcontact> wrote:
>
>> On 05/14/2007 09:20 PM, Mark Knecht wrote:
>>
>>> 2) When mythfrontend tries to connect from the remote machine
>>> lightning across the network to the backend it fails:
>> ...
>>
>>> QSqlDatabase: QMYSQL3 driver not loaded
>>> QSqlDatabase: available drivers:
>> ...
>>
>>> I've read online that this is mainly due to the qt library not
>>> having mysql support compiled in. I'm on Gentoo and beleive I do have
>>> myswl support compiled in.
>>>
>> Not according to the error message above, "available drivers:" (with no
>> drivers listed).
> I don't follow. OK, I see that there are no drivers listed. Do I
> need to recompile Myth again?
>

The list of drivers comes from the QT you're using (not from Myth). So,
it seems that either QT3 is compiled without MySQL support or QT3 can't
load the QT MySQL lib (can't find it, broken lib, ...).

> I also have 2 versions of qt installed in slots. Both report having
> mysql support.
>
> mark [at] lightnin ~ $ eix -I x11-libs/qt
> [I] x11-libs/qt
> Available versions:
> (3) 3.3.4-r8 3.3.8-r2
> (4) 4.2.3-r1 ~*4.3.0_beta1 ~4.3.0_rc1
>
> {accessibility cups dbus debug doc examples firebird gif glib
> immqt immqt-bc input_devices_wacom ipv6 jpeg mng mysql nas nis odbc
> opengl pch png postgres qt3support sqlite sqlite3 ssl tiff xinerama
> zlib}
>
> Installed versions: 3.3.8-r2(3)(09:05:22 PM 04/18/2007)(cups
> -debug -doc -examples -firebird gif -immqt -immqt-bc ipv6 mysql -nas
> -nis -odbc opengl -postgres -sqlite -xinerama)
>
> 4.2.3-r1(4)(07:42:10 PM
> 05/14/2007)(-accessibility cups dbus -debug -doc -examples -firebird
> gif -glib -input_devices_wacom jpeg -mng mysql -nas -nis -odbc opengl
> -pch png -postgres qt3support -sqlite -sqlite3 -xinerama zlib)
>
> Homepage: http://www.trolltech.com/
> Description: The Qt toolkit is a comprehensive C++
> application development framework.
>
> mark [at] lightnin ~ $
>
> I guess I'll rebuild Myth again and see if that helps.

If QT3 is compiled with MySQL support, Myth should just work, and you
shouldn't need to recompile Myth.

Any chance that:

QTDIR=/path/to/qt3
export QTDIR

in the script/environment that starts myth apps (mythtv-setup,
mythbackend, mtd, mythfrontend) makes it work? If so, in theory, you
can ensure it's always set like that since QT4 doesn't use QTDIR.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


newbury at mandamus

May 15, 2007, 10:17 PM

Post #7 of 8 (1593 views)
Permalink
Re: 'database not open' problem [In reply to]

Mark Knecht wrote:
> Hello,
> In parallel with getting my server working I'm also trying to get
> my remote machines upgraded and connecting over the network. Currently
> they do not connect correctly.
>
> 1) From my remote frontend I can connect to the database by hand:
>
> mark [at] lightnin ~ $ mysql -h 192.168.1.55 -u mythtv -p mythconverg
> Enter password:
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
> Welcome to the MySQL monitor. Commands end with ; or \g.
> Your MySQL connection id is 19
> Server version: 5.0.40 Gentoo Linux mysql-5.0.40
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql> quit
> Bye
> mark [at] lightnin ~ $
>
> This makes me believe that the changes to allow connection over the
> network have worked.
>
> 2) When mythfrontend tries to connect from the remote machine
> lightning across the network to the backend it fails:
>
>
> mark [at] lightnin ~ $ mythfrontend
> 2007-05-14 17:24:44.415 Using runtime prefix = /usr
> 2007-05-14 17:24:44.423 DPMS is active.
> 2007-05-14 17:24:44.423 Unable to read configuration file mysql.txt
> 2007-05-14 17:24:44.477 Trying to create a basic mysql.txt file
> 2007-05-14 17:24:44.477 Writing settings file /home/mark/.mythtv/mysql.txt
> QSqlDatabase: QMYSQL3 driver not loaded
> QSqlDatabase: available drivers:

This looks like you do not have the qt-MySQL driver package installed on
the remote computer. Note that this name is case sensitive so 'yum
install qt-mysql' will fail. IIRC the error message is misleading in
this case...

Geoff

--
R. Geoffrey Newbury


Helping with the HTTP issue
<a href="http://www.w3.org/Protocols/">HTTP</a>
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


darrenmarshall at linuxfire

Aug 31, 2007, 6:20 PM

Post #8 of 8 (1244 views)
Permalink
Re: 'database not open' problem [In reply to]

Hi there... by default mysql --skip-networking is enabled and is not listening
on port 3306. edit /etc/my.cnf or the mysql conf file and rem out the line
that has --skip-networking


On Tuesday 15 May 2007 23:42, Mark Knecht wrote:
> On 5/14/07, Darren <darrenmarshall [at] linuxfire> wrote:
> ><SNIP>
> >
> > Check to see if mysql is network enabled first. In a console use netstat
> > -l | grep mysql to see if it's listening on port 3306. Inspect mysql
> > config (usually /etc/my.cnf ) to check the port number it's listening to
> > and while your there make sure "skip-networking" is disabled, delete the
> > line or #skip-networking then restart mysql.
> > You will also need to make sure the remote mythfrontend can find
> > mythconverg host, in mythfrontend setup use the ip address of mythconverg
> > host computer and a ~/user/.mythtv/mysql.txt file will be created.
> >
> > goodluck
> > Darren
>
> Hi Darren,
> Thanks for the response. It seems that mysql is listening but I see
> no evidence that it's listening on port 3306. Most likely this is the
> problem but I don't see what's wrong about the setup on the backend
> server.
>
> (NOTE: I do have the backend server running more or less correctly at
> this point. I can view LiveTV and do recordings on both tuners. Only
> KTVU, Channel 2, is not working for some reason in Myth even though
> it's working fine at the command line.)
>
> dragonfly ~ # /etc/init.d/mysql stop
> * Stopping mysql ...
> * Stopping mysqld (0)
> [ ok ]
> dragonfly ~ # netstat -l | grep mysql
> dragonfly ~ # /etc/init.d/mysql status
> * status: stopped
> dragonfly ~ # /etc/init.d/mysql start
> * Starting mysql ...
> * Starting mysql (/etc/mysql/my.cnf)
> [ ok ]
> dragonfly ~ # netstat -l | grep mysql
> tcp 0 0 Dragonfly:mysql *:* LISTEN
> unix 2 [ ACC ] STREAM LISTENING 104813
> /var/run/mysqld/mysqld.sock
> dragonfly ~ #
>
> From my.cnf it seems that I have the settings I found on the Gentoo
> Wiki and that I think you are talking about:
>
> # The following options will be passed to all MySQL clients
> [client]
> #password = your_password
> port = 3306
> socket =
> /var/run/mysqld/mysqld.sock
>
> # add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
> [mysqld]
> character-set-server = utf8
> default-character-set = utf8
> user = mysql
> port = 3306
> socket =
> /var/run/mysqld/mysqld.sock pid-file
> = /var/run/mysqld/mysqld.pid log-error
> = /var/log/mysql/mysqld.err basedir
> = /usr
> datadir = /var/lib/mysql
> skip-locking
> key_buffer = 16M
> max_allowed_packet = 1M
> table_cache = 64
> sort_buffer_size = 512K
> net_buffer_length = 8K
> read_buffer_size = 256K
> read_rnd_buffer_size = 512K
> myisam_sort_buffer_size = 8M
> language = /usr/share/mysql/english
> #expire_logs_days = 7
>
> # security:
> # using "localhost" in connects uses sockets by default
> # skip-networking
> bind-address = 192.168.1.55
> port = 3306
>
> #log-bin
> server-id = 1
>
> My .mythtv/mysql.txt file has this:
>
> DBHostName=192.168.1.55
> DBUserName=mythtv
> DBPassword=mythtv
> DBName=mythconverg
> DBType=QMYSQL3
>
> That seems correct enough. I've deleted it and let Myth regenerate it
> and it comes back the same.
>
> Any ideas what's wrong with talking to the server?
>
> Thanks,
> Mark
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

--
linuxfire.biz
Darren Marshall
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.