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

Mailing List Archive: MythTV: Users

mythfrontend can't connect to backend/database

 

 

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


starcycle at gmail

Apr 20, 2008, 10:03 AM

Post #1 of 24 (9393 views)
Permalink
mythfrontend can't connect to backend/database

This is the error I'm getting, but I can't figure out what's wrong.
mythtv user can log in to mysql on the server. I don't understand why
it says it can't connect to MySQL server on localhost since the IP of
the mysql server is entered in the field.

Also, I noticed the ~/.mythtv directory and files were created with
root:root ownership, which seems kind of weird since it's the user's
directory. The mysql.txt file listed 192.168.0.1 as the database
location, I changed that to the correct IP, but it still didn't work.
Can anyone help sort this out?

==================================================
sero [at] home:~ $ mythfrontend
2008-04-20 12:50:11.763 Using runtime prefix = /usr, libdir = /usr/lib
2008-04-20 12:50:12.425 XScreenSaver support enabled
2008-04-20 12:50:12.425 DPMS is active.
2008-04-20 12:50:12.426 Empty LocalHostName.
2008-04-20 12:50:12.426 Using localhost value of homer
2008-04-20 12:50:12.436 New DB connection, total: 1
2008-04-20 12:50:12.437 Unable to connect to database!
2008-04-20 12:50:12.437 Driver error was [1/2003]:
QMYSQL3: Unable to connect
Database error was:
Can't connect to MySQL server on '192.168.0.1' (111) # [?????]

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 12:50:12.489 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...

2008-04-20 12:50:12.673 UPnPautoconf() - Found one UPnP backend
2008-04-20 12:50:12.702 Unable to connect to database!
2008-04-20 12:50:12.702 Driver error was [1/2013]:
QMYSQL3: Unable to connect
Database error was:
Lost connection to MySQL server at 'reading initial communication
packet', system error: 0

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 12:50:12.753 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2008-04-20 12:50:12.803 Cannot login to database?
2008-04-20 12:50:13.812 Total desktop dim: 1680x1050, with 1 screen[s].
2008-04-20 12:50:13.812 Using screen 0, 1680x1050 at 0,0
2008-04-20 12:50:13.813 Switching to square mode (blue)
2008-04-20 12:50:13.869 Using the Qt painter
mythtv: could not connect to socket
mythtv: No such file or directory
2008-04-20 12:50:13.872 lirc_init failed for mythtv, see preceding messages
2008-04-20 12:50:13.885 JoystickMenuClient Error: Joystick disabled -
Failed to read /home/sero/.mythtv/joystickmenurc
QSettings::sync: filename is null/empty
QSettings::sync: filename is null/empty
QSettings::sync: filename is null/empty
QSettings::sync: filename is null/empty
2008-04-20 12:50:16.752 DB Error (Clear setting):
Query was:

No error type from QSqlError? Strange...
2008-04-20 12:50:16.753 DB Error (SaveSettingOnHost query failure: ):
Query was:

No error type from QSqlError? Strange...
2008-04-20 12:50:16.753 DB Error (Clear setting):
Query was:

No error type from QSqlError? Strange...
2008-04-20 12:50:16.753 DB Error (SaveSettingOnHost query failure: ):
Query was:

No error type from QSqlError? Strange...
2008-04-20 12:50:21.299 User cancelled database configuration
2008-04-20 12:50:21.405 Failed to init MythContext, exiting.
=========================================================
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


starcycle at gmail

Apr 20, 2008, 10:50 AM

Post #2 of 24 (8562 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

I still can't get it to work, but I installed mythtv on my laptop and
when I run mythfrontend it lists MythTV AV Media Server with the
hostname of the server, and a "Configure Manually" button.

When I press <enter> on either the server listing or on "Configure
Manually," a dialog pops up that asks for the PIN, and then after that
another one comes up that asks, "Save that backend or database as the
default?" On either one I select, it bounces out of the frontend gui
for a minute, then starts back in with a dialog that says "Cannot
login to database?" I hit "ok," and it goes back to the initial
screen.

I got this once on the desktop machine, but then it stopped listing
the server and went back to just displaying the initial setup screen.
I have no idea what I changed to allow that, but it won't change it
back.

How can I find out why these clients won't connect to the database?

thx

On Sun, Apr 20, 2008 at 1:03 PM, starcycle <starcycle [at] gmail> wrote:
> This is the error I'm getting, but I can't figure out what's wrong.
> mythtv user can log in to mysql on the server. I don't understand why
> it says it can't connect to MySQL server on localhost since the IP of
> the mysql server is entered in the field.
>
> Also, I noticed the ~/.mythtv directory and files were created with
> root:root ownership, which seems kind of weird since it's the user's
> directory. The mysql.txt file listed 192.168.0.1 as the database
> location, I changed that to the correct IP, but it still didn't work.
> Can anyone help sort this out?
>
> ==================================================
> sero [at] home:~ $ mythfrontend
> 2008-04-20 12:50:11.763 Using runtime prefix = /usr, libdir = /usr/lib
> 2008-04-20 12:50:12.425 XScreenSaver support enabled
> 2008-04-20 12:50:12.425 DPMS is active.
> 2008-04-20 12:50:12.426 Empty LocalHostName.
> 2008-04-20 12:50:12.426 Using localhost value of homer
> 2008-04-20 12:50:12.436 New DB connection, total: 1
> 2008-04-20 12:50:12.437 Unable to connect to database!
> 2008-04-20 12:50:12.437 Driver error was [1/2003]:
> QMYSQL3: Unable to connect
> Database error was:
> Can't connect to MySQL server on '192.168.0.1' (111) # [?????]
>
> QSqlQuery::exec: database not open
> QSqlQuery::exec: database not open
> 2008-04-20 12:50:12.489 DB Error (KickDatabase):
> Query was:
> SELECT NULL;
> No error type from QSqlError? Strange...
>
> 2008-04-20 12:50:12.673 UPnPautoconf() - Found one UPnP backend
> 2008-04-20 12:50:12.702 Unable to connect to database!
> 2008-04-20 12:50:12.702 Driver error was [1/2013]:
> QMYSQL3: Unable to connect
> Database error was:
> Lost connection to MySQL server at 'reading initial communication
> packet', system error: 0
>
> QSqlQuery::exec: database not open
> QSqlQuery::exec: database not open
> 2008-04-20 12:50:12.753 DB Error (KickDatabase):
> Query was:
> SELECT NULL;
> No error type from QSqlError? Strange...
> 2008-04-20 12:50:12.803 Cannot login to database?
> 2008-04-20 12:50:13.812 Total desktop dim: 1680x1050, with 1 screen[s].
> 2008-04-20 12:50:13.812 Using screen 0, 1680x1050 at 0,0
> 2008-04-20 12:50:13.813 Switching to square mode (blue)
> 2008-04-20 12:50:13.869 Using the Qt painter
> mythtv: could not connect to socket
> mythtv: No such file or directory
> 2008-04-20 12:50:13.872 lirc_init failed for mythtv, see preceding messages
> 2008-04-20 12:50:13.885 JoystickMenuClient Error: Joystick disabled -
> Failed to read /home/sero/.mythtv/joystickmenurc
> QSettings::sync: filename is null/empty
> QSettings::sync: filename is null/empty
> QSettings::sync: filename is null/empty
> QSettings::sync: filename is null/empty
> 2008-04-20 12:50:16.752 DB Error (Clear setting):
> Query was:
>
> No error type from QSqlError? Strange...
> 2008-04-20 12:50:16.753 DB Error (SaveSettingOnHost query failure: ):
> Query was:
>
> No error type from QSqlError? Strange...
> 2008-04-20 12:50:16.753 DB Error (Clear setting):
> Query was:
>
> No error type from QSqlError? Strange...
> 2008-04-20 12:50:16.753 DB Error (SaveSettingOnHost query failure: ):
> Query was:
>
> No error type from QSqlError? Strange...
> 2008-04-20 12:50:21.299 User cancelled database configuration
> 2008-04-20 12:50:21.405 Failed to init MythContext, exiting.
> =========================================================
>
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Apr 20, 2008, 10:57 AM

Post #3 of 24 (8453 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On 04/20/2008 01:03 PM, starcycle wrote:
> This is the error I'm getting, but I can't figure out what's wrong.
> mythtv user can log in to mysql on the server. I don't understand why
> it says it can't connect to MySQL server on localhost since the IP of
> the mysql server is entered in the field.
>
> Also, I noticed the ~/.mythtv directory and files were created with
> root:root ownership, which seems kind of weird since it's the user's
> directory. The mysql.txt file listed 192.168.0.1 as the database
> location, I changed that to the correct IP, but it still didn't work.
> Can anyone help sort this out?

Fix ~/.mythtv/config.xml . Best bet is to rm
~/.mythtv/{mysql.txt,config.xml} , then reconfigure.

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


starcycle at gmail

Apr 20, 2008, 10:58 AM

Post #4 of 24 (8400 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

Okay -- apparently adding the PIN in the backend is what allowed the
server screen to come up. Apparently that is a bug, because the
mythtv-setup screen says that 0000 allows connection from all hosts,
but apparently it doesn't. I can only connect when there's an actual
pin.

Now I just have to figure why the clients won't connect to the
database. Do I need a "mythtv" user or group on the clients?

thx

On Sun, Apr 20, 2008 at 1:50 PM, starcycle <starcycle [at] gmail> wrote:
> I still can't get it to work, but I installed mythtv on my laptop and
> when I run mythfrontend it lists MythTV AV Media Server with the
> hostname of the server, and a "Configure Manually" button.
>....
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mtdean at thirdcontact

Apr 20, 2008, 11:15 AM

Post #5 of 24 (8401 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On 04/20/2008 01:58 PM, starcycle wrote:
> Okay -- apparently adding the PIN in the backend is what allowed the
> server screen to come up. Apparently that is a bug, because the
> mythtv-setup screen says that 0000 allows connection from all hosts,
> but apparently it doesn't. I can only connect when there's an actual
> pin.
>

It also says that blank prevents all connections. Did you actually type
in 0000 and save it?

> Now I just have to figure why the clients won't connect to the
> database. Do I need a "mythtv" user or group on the clients?

Fix the ~/.mythtv/config.xml's...

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


starcycle at gmail

Apr 20, 2008, 11:34 AM

Post #6 of 24 (8437 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On Sun, Apr 20, 2008 at 2:15 PM, Michael T. Dean
<mtdean [at] thirdcontact> wrote:
>
> It also says that blank prevents all connections. Did you actually type
> in 0000 and save it?

that's what it said, so that's what I did. ;)

>
>
> > Now I just have to figure why the clients won't connect to the
> > database. Do I need a "mythtv" user or group on the clients?
>
> Fix the ~/.mythtv/config.xml's...

I'm not sure what it means to fix it. It just has some long number in
xml tags, like this:
<MediaRenderer>26aae4b6-2605-4e1d-8cfb-5525acc8b459</MediaRenderer>

and also the pin. I deleted the files a number of times and retried,
and I keep getting the same thing.

Btw, when I select the "manual config," the setup screen comes up
where you enter the IP, etc. But if I select it after doing a "save
the database/backend" screen, a dialog comes up saying it "can't find
(ping) database host on the network." I can ping everything on the lan
from everywhere else, so I'm not sure why mythtv can't ping.


FWIW, here's the output after deleting the ~/.mythtv directory
contents, followed by the output of starting the backend. maybe
someone can spot a problem:

client:
====================================
>
jeff [at] bar:~ $ mythfrontend
2008-04-20 14:23:18.876 Using runtime prefix = /usr, libdir = /usr/lib
2008-04-20 14:23:19.584 DPMS is active.
2008-04-20 14:23:19.585 Unable to read configuration file mysql.txt
2008-04-20 14:23:19.585 Empty LocalHostName.
2008-04-20 14:23:19.585 Using localhost value of bart
QSettings::sync: filename is null/empty
2008-04-20 14:23:19.598 New DB connection, total: 1
2008-04-20 14:23:19.599 Unable to connect to database!
2008-04-20 14:23:19.599 Driver error was [1/2002]:
QMYSQL3: Unable to connect
Database error was:
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 14:23:19.660 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...

2008-04-20 14:23:19.877 UPnPautoconf() - Found one UPnP backend
2008-04-20 14:23:19.919 MythXMLClient::GetConnectionInfo Failed -
(606) Action Not Authorized
2008-04-20 14:23:20.600 Total desktop dim: 1400x1050, with 1 screen[s].
2008-04-20 14:23:20.601 Using screen 0, 1400x1050 at 0,0
2008-04-20 14:23:20.603 Switching to square mode (blue)
2008-04-20 14:23:20.685 Using the Qt painter
mythtv: could not connect to socket
mythtv: No such file or directory
2008-04-20 14:23:20.687 lirc_init failed for mythtv, see preceding messages
2008-04-20 14:23:20.697 JoystickMenuClient Error: Joystick disabled -
Failed to read /home/jeff/.mythtv/joystickmenurc
QSettings::sync: filename is null/empty
QSettings::sync: filename is null/empty
QSettings::sync: filename is null/empty
2008-04-20 14:23:23.679 DB Error (Clear setting):
Query was:

No error type from QSqlError? Strange...
2008-04-20 14:23:23.679 DB Error (SaveSettingOnHost query failure: ):
Query was:

No error type from QSqlError? Strange...
2008-04-20 14:23:23.680 DB Error (Clear setting):
Query was:

No error type from QSqlError? Strange...
2008-04-20 14:23:23.680 DB Error (SaveSettingOnHost query failure: ):
Query was:

No error type from QSqlError? Strange...
2008-04-20 14:23:23.680 Putting up the UPnP backend chooser
2008-04-20 14:23:25.482 MythXMLClient::GetConnectionInfo Failed -
(606) Action Not Authorized
2008-04-20 14:23:28.488 Unable to connect to database!
2008-04-20 14:23:28.490 Driver error was [1/2013]:
QMYSQL3: Unable to connect
Database error was:
Lost connection to MySQL server at 'reading initial communication
packet', system error: 0

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 14:23:28.546 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2008-04-20 14:23:28.596 Database not open while trying to load
setting: UseArrowAccels
2008-04-20 14:23:28.600 Unable to connect to database!
2008-04-20 14:23:28.600 Driver error was [1/2013]:
QMYSQL3: Unable to connect
Database error was:
Lost connection to MySQL server at 'reading initial communication
packet', system error: 0

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 14:23:28.655 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2008-04-20 14:23:28.706 Database not open while trying to load
setting: PopupHeightPadding
2008-04-20 14:23:28.710 Unable to connect to database!
2008-04-20 14:23:28.711 Driver error was [1/2013]:
QMYSQL3: Unable to connect
Database error was:
Lost connection to MySQL server at 'reading initial communication
packet', system error: 0

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 14:23:28.766 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2008-04-20 14:23:28.816 Database not open while trying to load
setting: PopupWidthPadding
2008-04-20 14:23:31.911 Testing network connectivity to 192.168.0.103
2008-04-20 14:23:32.003 Unable to connect to database!
2008-04-20 14:23:32.004 Driver error was [1/2013]:
QMYSQL3: Unable to connect
Database error was:
Lost connection to MySQL server at 'reading initial communication
packet', system error: 0

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 14:23:32.065 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2008-04-20 14:23:32.116 Cannot login to database?
2008-04-20 14:23:32.116 Total desktop dim: 1400x1050, with 1 screen[s].
2008-04-20 14:23:32.116 Using screen 0, 1400x1050 at 0,0
2008-04-20 14:23:32.118 Switching to square mode (blue)
2008-04-20 14:23:32.136 Using the Qt painter
mythtv: could not connect to socket
mythtv: No such file or directory
2008-04-20 14:23:32.136 lirc_init failed for mythtv, see preceding messages
2008-04-20 14:23:32.143 JoystickMenuClient Error: Joystick disabled -
Failed to read /home/jeff/.mythtv/joystickmenurc
2008-04-20 14:23:34.838 DB Error (Clear setting):
Query was:

No error type from QSqlError? Strange...
2008-04-20 14:23:34.838 DB Error (SaveSettingOnHost query failure: ):
Query was:

No error type from QSqlError? Strange...
2008-04-20 14:23:35.708 Putting up the UPnP backend chooser
2008-04-20 14:23:37.974 User requested Manual Config
2008-04-20 14:23:37.974 Testing network connectivity to
2008-04-20 14:23:38.034 Cannot find (ping) database host on the network
2008-04-20 14:23:38.034 Cannot find (ping) database host on the network
2008-04-20 14:23:41.850 Putting up the UPnP backend chooser
2008-04-20 14:23:42.946 MythXMLClient::GetConnectionInfo Failed -
(606) Action Not Authorized
2008-04-20 14:23:46.269 Unable to connect to database!
2008-04-20 14:23:46.271 Driver error was [1/2013]:
QMYSQL3: Unable to connect
Database error was:
Lost connection to MySQL server at 'reading initial communication
packet', system error: 0

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 14:23:46.326 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2008-04-20 14:23:46.376 Database not open while trying to load
setting: UseArrowAccels
2008-04-20 14:23:46.381 Unable to connect to database!
2008-04-20 14:23:46.381 Driver error was [1/2013]:
QMYSQL3: Unable to connect
Database error was:
Lost connection to MySQL server at 'reading initial communication
packet', system error: 0

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 14:23:46.438 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2008-04-20 14:23:46.488 Database not open while trying to load
setting: PopupHeightPadding
2008-04-20 14:23:46.493 Unable to connect to database!
2008-04-20 14:23:46.493 Driver error was [1/2013]:
QMYSQL3: Unable to connect
Database error was:
Lost connection to MySQL server at 'reading initial communication
packet', system error: 0

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 14:23:46.548 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2008-04-20 14:23:46.598 Database not open while trying to load
setting: PopupWidthPadding
2008-04-20 14:23:50.030 Writing settings file /home/jeff/.mythtv/mysql.txt
2008-04-20 14:23:50.045 Could not find widget to detach
2008-04-20 14:23:50.046 Testing network connectivity to 192.168.0.103
2008-04-20 14:23:50.106 Unable to connect to database!
2008-04-20 14:23:50.107 Driver error was [1/2013]:
QMYSQL3: Unable to connect
Database error was:
Lost connection to MySQL server at 'reading initial communication
packet', system error: 0

QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-04-20 14:23:50.163 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError? Strange...
2008-04-20 14:23:50.213 Cannot login to database?
2008-04-20 14:23:50.213 Cannot login to database?
2008-04-20 14:23:50.213 Total desktop dim: 1400x1050, with 1 screen[s].
2008-04-20 14:23:50.214 Using screen 0, 1400x1050 at 0,0
2008-04-20 14:23:50.216 Switching to square mode (blue)
2008-04-20 14:23:50.276 Using the Qt painter
mythtv: could not connect to socket
mythtv: No such file or directory
2008-04-20 14:23:50.276 lirc_init failed for mythtv, see preceding messages
2008-04-20 14:23:50.283 JoystickMenuClient Error: Joystick disabled -
Failed to read /home/jeff/.mythtv/joystickmenurc
2008-04-20 14:23:52.468 DB Error (Clear setting):
Query was:

No error type from QSqlError? Strange...
2008-04-20 14:23:52.468 DB Error (SaveSettingOnHost query failure: ):
Query was:

No error type from QSqlError? Strange...
2008-04-20 14:23:53.275 Putting up the UPnP backend chooser
2008-04-20 14:23:54.371 User canceled database configuration
2008-04-20 14:23:54.371 Failed to init MythContext, exiting.
======================================

server:
=======================================

root [at] mo:/home/jeff # /etc/init.d/mythtv-backend restart
Restarting MythTV server: mythbackend .
cannot open logfile /var/log/mythtv/mythbackend.log
cannot open logfile; using stdout/stderr
2008-04-20 14:32:00.286 Using runtime prefix = /usr, libdir = /usr/lib
2008-04-20 14:32:00.287 Unable to read configuration file mysql.txt
2008-04-20 14:32:00.287 Empty LocalHostName.
2008-04-20 14:32:00.287 Using localhost value of moe
.
root [at] mo:/home/jeff # 2008-04-20 14:32:00.325 New DB connection, total: 1
2008-04-20 14:32:00.332 Connected to database 'mythconverg' at host: localhost
2008-04-20 14:32:00.334 Closing DB connection named 'DBManager0'
2008-04-20 14:32:00.336 Connected to database 'mythconverg' at host: localhost
2008-04-20 14:32:00.338 New DB connection, total: 2
2008-04-20 14:32:00.338 Connected to database 'mythconverg' at host: localhost
2008-04-20 14:32:00.341 Current Schema Version: 1214
Starting up as the master server.
2008-04-20 14:32:01.585 Main::Registering HttpStatus Extension
2008-04-20 14:32:01.586 mythbackend version: 0.21.20080304-1 www.mythtv.org
2008-04-20 14:32:01.586 Enabled verbose msgs: important general
2008-04-20 14:32:01.588 AutoExpire: CalcParams(): Max required Free
Space: 0.0 GB w/freq: 15 min
2008-04-20 14:32:10.367 UPnpMedia: BuildMediaMap - no VideoStartupDir
set, skipping scan.

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


mythtv_arizona at yahoo

Apr 20, 2008, 11:34 AM

Post #7 of 24 (8350 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

--- starcycle <starcycle [at] gmail> wrote:

> This is the error I'm getting, but I can't figure
> out what's wrong.
> mythtv user can log in to mysql on the server. I
> don't understand why
> it says it can't connect to MySQL server on
> localhost since the IP of
> the mysql server is entered in the field.
>
> Also, I noticed the ~/.mythtv directory and files
> were created with
> root:root ownership, which seems kind of weird since
> it's the user's
> directory. The mysql.txt file listed 192.168.0.1 as
> the database
> location, I changed that to the correct IP, but it
> still didn't work.
> Can anyone help sort this out?
>
> ==================================================
> sero [at] home:~ $ mythfrontend
> 2008-04-20 12:50:11.763 Using runtime prefix = /usr,
> libdir = /usr/lib
> 2008-04-20 12:50:12.425 XScreenSaver support enabled
> 2008-04-20 12:50:12.425 DPMS is active.
> 2008-04-20 12:50:12.426 Empty LocalHostName.
> 2008-04-20 12:50:12.426 Using localhost value of
> homer
> 2008-04-20 12:50:12.436 New DB connection, total: 1
> 2008-04-20 12:50:12.437 Unable to connect to
> database!
> 2008-04-20 12:50:12.437 Driver error was [1/2003]:
> QMYSQL3: Unable to connect
> Database error was:
> Can't connect to MySQL server on '192.168.0.1' (111)
> # [?????]
>
> QSqlQuery::exec: database not open
> QSqlQuery::exec: database not open
> 2008-04-20 12:50:12.489 DB Error (KickDatabase):
> Query was:
> SELECT NULL;
> No error type from QSqlError? Strange...
>
> 2008-04-20 12:50:12.673 UPnPautoconf() - Found one
> UPnP backend
> 2008-04-20 12:50:12.702 Unable to connect to
> database!
> 2008-04-20 12:50:12.702 Driver error was [1/2013]:
> QMYSQL3: Unable to connect
> Database error was:
> Lost connection to MySQL server at 'reading initial
> communication
> packet', system error: 0
>
> QSqlQuery::exec: database not open
> QSqlQuery::exec: database not open
> 2008-04-20 12:50:12.753 DB Error (KickDatabase):
> Query was:
> SELECT NULL;
> No error type from QSqlError? Strange...
> 2008-04-20 12:50:12.803 Cannot login to database?
> 2008-04-20 12:50:13.812 Total desktop dim:
> 1680x1050, with 1 screen[s].
> 2008-04-20 12:50:13.812 Using screen 0, 1680x1050 at
> 0,0
> 2008-04-20 12:50:13.813 Switching to square mode
> (blue)
> 2008-04-20 12:50:13.869 Using the Qt painter
> mythtv: could not connect to socket
> mythtv: No such file or directory
> 2008-04-20 12:50:13.872 lirc_init failed for mythtv,
> see preceding messages
> 2008-04-20 12:50:13.885 JoystickMenuClient Error:
> Joystick disabled -
> Failed to read /home/sero/.mythtv/joystickmenurc
> QSettings::sync: filename is null/empty
> QSettings::sync: filename is null/empty
> QSettings::sync: filename is null/empty
> QSettings::sync: filename is null/empty
> 2008-04-20 12:50:16.752 DB Error (Clear setting):
> Query was:
>
> No error type from QSqlError? Strange...
> 2008-04-20 12:50:16.753 DB Error (SaveSettingOnHost
> query failure: ):
> Query was:
>
> No error type from QSqlError? Strange...
> 2008-04-20 12:50:16.753 DB Error (Clear setting):
> Query was:
>
> No error type from QSqlError? Strange...
> 2008-04-20 12:50:16.753 DB Error (SaveSettingOnHost
> query failure: ):
> Query was:
>
> No error type from QSqlError? Strange...
> 2008-04-20 12:50:21.299 User cancelled database
> configuration
> 2008-04-20 12:50:21.405 Failed to init MythContext,
> exiting.
>
=========================================================
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
>
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

Under mythtv-setup then General what do you have for
IP address for both local and backend?


____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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


starcycle at gmail

Apr 20, 2008, 11:38 AM

Post #8 of 24 (8322 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On Sun, Apr 20, 2008 at 2:34 PM, Steve Wilson <mythtv_arizona [at] yahoo> wrote:
>
>
> Under mythtv-setup then General what do you have for
> IP address for both local and backend?

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


mythtv_arizona at yahoo

Apr 20, 2008, 11:52 AM

Post #9 of 24 (8311 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

--- starcycle <starcycle [at] gmail> wrote:

> On Sun, Apr 20, 2008 at 2:34 PM, Steve Wilson
> <mythtv_arizona [at] yahoo> wrote:
> >
> >
> > Under mythtv-setup then General what do you have
> for
> > IP address for both local and backend?
>
> 192.168.0.101
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
>
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

When you do a #ifconfig does it give you an IP address
of 192.168.0.101.


____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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


starcycle at gmail

Apr 20, 2008, 11:57 AM

Post #10 of 24 (8310 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

god this is frustrating. out of curiosity I launched mythfrontend on
the server, and that works fine. so apparently it's a network problem?

the ports should already be accessible to the LAN, but I explicitly
opened them anyway, 3066 for mysql and 6543:6544 for mythtv. but still
no go.

I followed all the tutorials for allowing network access in
/etc/mysql/my.cnf (commenting out # localhost, etc.), and added
askip-innodb and set-variable=thread_stack=256k as specified for
connection problems in the mythtv doc, but I must have missed
something. this is really kicking my butt! <grr> something is
configured wrong somewhere to allow network access, but i'm out of
ideas.

do you need to specify anything for mythtv or mysql in
/etc/hosts.allow and .deny? I didn't think you need to for mysql at
least.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


starcycle at gmail

Apr 20, 2008, 11:59 AM

Post #11 of 24 (8303 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On Sun, Apr 20, 2008 at 2:52 PM, Steve Wilson <mythtv_arizona [at] yahoo> wrote:
>
> When you do a #ifconfig does it give you an IP address
> of 192.168.0.101.

On the server? yes, it's set statically in my router.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


starcycle at gmail

Apr 20, 2008, 1:48 PM

Post #12 of 24 (8322 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

I'm noticing this error:

==============================
2008-04-20 16:13:15.262 Unexpected DB Schema version. Waiting to see
if DB is being upg raded.
2008-04-20 16:13:20.265 Timed out waiting.
2008-04-20 16:13:20.265 This version of MythTV requires an updated
database schema. Please run mythtv-setup or mythbackend to update your
database.
==============================

I've been running mythtv-setup and mythbackend, but apparently the
database "schema" isn't updating. There's an "information_schema" in
mysql, is that referring to the same thing?

I checked the backend.log, it said this - have no idea what it means,
or if 1214 is the version I need or what:

====================================
2008-04-12 19:59:14.972 Using runtime prefix = /usr, libdir = /usr/lib
2008-04-12 19:59:15.052 Empty LocalHostName.
2008-04-12 19:59:15.265 Using localhost value of moe
2008-04-12 19:59:15.403 New DB connection, total: 1
2008-04-12 19:59:15.454 Connected to database 'mythconverg' at host: localhost
2008-04-12 19:59:15.466 Closing DB connection named 'DBManager0'
2008-04-12 19:59:15.469 Connected to database 'mythconverg' at host: localhost
2008-04-12 19:59:15.524 New DB connection, total: 2
2008-04-12 19:59:15.526 Connected to database 'mythconverg' at host: localhost
2008-04-12 19:59:15.538 Current Schema Version:
2008-04-12 19:59:15.540 DataDirectProcessor::FixProgramIDs() -- begin
2008-04-12 19:59:15.543 New DB DataDirect connection
2008-04-12 19:59:15.546 Connected to database 'mythconverg' at host: localhost
2008-04-12 19:59:15.597 DB Error (Fixing program ids in recorded):
Query was:
UPDATE recorded SET programid=CONCAT(SUBSTRING(programid, 1, 2),
'00', SUBSTRING(programid, 3)) WHERE length(programid)
= 12
Driver error was [2/1146]:
QMYSQL3: Unable to execute query
Database error was:
Table 'mythconverg.recorded' doesn't exist

2008-04-12 19:59:15.642 DB Error (Clear setting):
Query was:
DELETE FROM settings WHERE value = 'BackupDBLastRunStart' AND hostname is NULL;
Driver error was [2/1146]:
QMYSQL3: Unable to execute query
Database error was:
Table 'mythconverg.settings' doesn't exist

2008-04-12 19:59:15.685 DB Error (SaveSettingOnHost query failure: ):
Query was:
INSERT INTO settings (value,data,hostname ) VALUES (
'BackupDBLastRunStart', '2008-04-12 19:59:15', NULL );
Driver error was [2/1146]:
QMYSQL3: Unable to execute query
Database error was:
Table 'mythconverg.settings' doesn't exist

2008-04-12 19:59:15.717 DB Error (StorageGroup::StorageGroup()):
Query was:
SELECT DISTINCT dirname FROM storagegroup WHERE groupname = 'DB
Backups' AND hostname = 'moe'
Driver error was [2/1146]:
QMYSQL3: Unable to execute query
Database error was:
Table 'mythconverg.storagegroup' doesn't exist

2008-04-12 19:59:15.738 New DB connection, total: 3
2008-04-12 19:59:15.754 Connected to database 'mythconverg' at host: localhost
2008-04-12 19:59:15.766 SG(DB Backups) Error: Directory value for
Default Storage Group is empty. Using hardcoded default value of
'/mnt/store'
2008-04-12 19:59:15.772 SG(DB Backups) Error: FindNextDirMostFree:
'/mnt/store' does not exist!
2008-04-12 19:59:15.777 Backing up database to file:
/tmp/mythconverg--20080412195915.sql
2008-04-12 19:59:15.917 Compressing database backup file.
2008-04-12 19:59:16.074 Database Backup filename:
/tmp/mythconverg--20080412195915.sql.gz
2008-04-12 19:59:16.236 Database Backup complete.
2008-04-12 19:59:16.239 DB Error (Clear setting):
Query was:
DELETE FROM settings WHERE value = 'BackupDBLastRunEnd' AND hostname is NULL;
Driver error was [2/1146]:
QMYSQL3: Unable to execute query
Database error was:
Table 'mythconverg.settings' doesn't exist

2008-04-12 19:59:16.240 DB Error (SaveSettingOnHost query failure: ):
Query was:
INSERT INTO settings (value,data,hostname ) VALUES (
'BackupDBLastRunEnd', '2008-04-12 19:59:16', NULL );
Driver error was [2/1146]:
QMYSQL3: Unable to execute query
Database error was:
Table 'mythconverg.settings' doesn't exist

2008-04-12 19:59:16.255 No current database version. Auto upgrading
2008-04-12 19:59:16.257 Newest Schema Version : 1214
2008-04-12 19:59:16.261 Inserting MythTV initial database information.
2008-04-12 19:59:16.263 Upgrading to schema version 1112
2008-04-12 19:59:16.544 New DB connection, total: 4
2008-04-12 19:59:16.549 Connected to database 'mythconverg' at host: localhost
2008-04-12 19:59:16.551 Upgrading to schema version 1113
2008-04-12 19:59:16.555 Upgrading to schema version 1114
2008-04-12 19:59:16.559 Upgrading to schema version 1115
2008-04-12 19:59:16.567 Upgrading to schema version 1116
2008-04-12 19:59:16.572 Upgrading to schema version 1117
2008-04-12 19:59:16.583 Upgrading to schema version 1118
2008-04-12 19:59:16.636 Upgrading to schema version 1119
2008-04-12 19:59:16.641 Upgrading to schema version 1120
2008-04-12 19:59:16.651 Upgrading to schema version 1121
2008-04-12 19:59:16.656 Upgrading to schema version 1122
2008-04-12 19:59:16.686 Upgrading to schema version 1123
2008-04-12 19:59:16.702 Upgrading to schema version 1124
2008-04-12 19:59:16.715 Upgrading to schema version 1125
2008-04-12 19:59:16.735 Upgrading to schema version 1126
2008-04-12 19:59:16.767 Upgrading to schema version 1127
2008-04-12 19:59:16.787 Upgrading to schema version 1128
2008-04-12 19:59:16.800 Upgrading to schema version 1129
2008-04-12 19:59:16.834 Upgrading to schema version 1130
2008-04-12 19:59:16.839 Upgrading to schema version 1131
2008-04-12 19:59:16.852 Upgrading to schema version 1132
2008-04-12 19:59:16.863 Upgrading to schema version 1133
2008-04-12 19:59:16.875 Upgrading to schema version 1134
2008-04-12 19:59:16.880 Upgrading to schema version 1135
2008-04-12 19:59:16.900 Upgrading to schema version 1136
2008-04-12 19:59:16.912 Upgrading to schema version 1137
2008-04-12 19:59:16.923 Upgrading to schema version 1138
2008-04-12 19:59:16.929 Upgrading to schema version 1139
2008-04-12 19:59:17.126 Upgrading to schema version 1140
2008-04-12 19:59:17.130 Upgrading to schema version 1141
2008-04-12 19:59:17.148 Upgrading to schema version 1142
2008-04-12 19:59:17.158 Upgrading to schema version 1143
2008-04-12 19:59:17.172 Upgrading to schema version 1144
2008-04-12 19:59:17.177 Upgrading to schema version 1145
2008-04-12 19:59:17.185 Upgrading to schema version 1146
2008-04-12 19:59:17.190 Upgrading to schema version 1147
2008-04-12 19:59:17.208 Upgrading to schema version 1148
2008-04-12 19:59:17.228 Upgrading to schema version 1149
2008-04-12 19:59:17.237 Upgrading to schema version 1150
2008-04-12 19:59:17.242 Upgrading to schema version 1151
2008-04-12 19:59:17.261 Upgrading to schema version 1152
2008-04-12 19:59:17.271 Upgrading to schema version 1153
2008-04-12 19:59:17.292 Upgrading to schema version 1154
2008-04-12 19:59:17.332 Upgrading to schema version 1155
2008-04-12 19:59:17.352 Upgrading to schema version 1156
2008-04-12 19:59:17.363 Upgrading to schema version 1157
2008-04-12 19:59:17.368 Upgrading to schema version 1158
2008-04-12 19:59:17.396 Upgrading to schema version 1159
2008-04-12 19:59:17.408 Upgrading to schema version 1160
2008-04-12 19:59:17.412 Upgrading to schema version 1161
2008-04-12 19:59:17.423 Upgrading to schema version 1162
2008-04-12 19:59:17.429 Upgrading to schema version 1163
2008-04-12 19:59:17.432 Upgrading to schema version 1164
2008-04-12 19:59:17.452 Upgrading to schema version 1165
2008-04-12 19:59:17.465 Upgrading to schema version 1166
2008-04-12 19:59:17.484 Upgrading to schema version 1167
2008-04-12 19:59:17.489 Upgrading to schema version 1168
2008-04-12 19:59:17.498 Upgrading to schema version 1169
2008-04-12 19:59:17.503 Upgrading to schema version 1170
2008-04-12 19:59:17.506 Upgrading to schema version 1171
2008-04-12 19:59:17.604 Upgrading to schema version 1172
2008-04-12 19:59:17.611 Upgrading to schema version 1173
2008-04-12 19:59:17.623 Upgrading to schema version 1174
2008-04-12 19:59:17.646 Upgrading to schema version 1175
2008-04-12 19:59:17.651 Upgrading to schema version 1176
2008-04-12 19:59:17.655 Upgrading to schema version 1177
2008-04-12 19:59:17.667 Upgrading to schema version 1178
2008-04-12 19:59:17.800 Upgrading to schema version 1179
2008-04-12 19:59:17.956 Upgrading to schema version 1180
2008-04-12 19:59:17.975 Upgrading to schema version 1181
2008-04-12 19:59:17.995 Upgrading to schema version 1182
2008-04-12 19:59:18.000 Upgrading to schema version 1183
2008-04-12 19:59:18.011 Upgrading to schema version 1184
2008-04-12 19:59:18.025 Upgrading to schema version 1185
2008-04-12 19:59:18.034 Upgrading to schema version 1186
2008-04-12 19:59:18.041 Upgrading to schema version 1187
2008-04-12 19:59:18.051 Upgrading to schema version 1188
2008-04-12 19:59:18.058 Upgrading to schema version 1189
2008-04-12 19:59:18.068 Upgrading to schema version 1190
2008-04-12 19:59:18.141 Upgrading to schema version 1191
2008-04-12 19:59:18.150 Upgrading to schema version 1192
2008-04-12 19:59:18.162 Upgrading to schema version 1193
2008-04-12 19:59:18.176 Upgrading to schema version 1194
2008-04-12 19:59:18.185 Upgrading to schema version 1195
2008-04-12 19:59:18.190 Upgrading to schema version 1196
2008-04-12 19:59:18.194 Upgrading to schema version 1197
2008-04-12 19:59:18.199 Upgrading to schema version 1198
2008-04-12 19:59:18.202 Upgrading to schema version 1199
2008-04-12 19:59:18.206 Upgrading to schema version 1200
2008-04-12 19:59:18.211 Upgrading to schema version 1201
2008-04-12 19:59:18.215 Upgrading to schema version 1202
2008-04-12 19:59:18.248 Upgrading to schema version 1203
2008-04-12 19:59:18.258 Upgrading to schema version 1204
2008-04-12 19:59:18.263 Upgrading to schema version 1205
2008-04-12 19:59:18.271 Upgrading to schema version 1206
2008-04-12 19:59:18.276 Upgrading to schema version 1207
2008-04-12 19:59:18.295 Upgrading to schema version 1208
2008-04-12 19:59:18.308 Upgrading to schema version 1209
2008-04-12 19:59:18.320 Upgrading to schema version 1210
2008-04-12 19:59:18.383 Upgrading to schema version 1211
2008-04-12 19:59:18.436 Upgrading to schema version 1212
2008-04-12 19:59:18.459 Upgrading to schema version 1213
2008-04-12 19:59:18.467 In 1213 upg
2008-04-12 19:59:18.469 Upgrading to schema version 1214
2008-04-12 19:59:18.472 Database Schema upgrade complete, unlocking.
No setting found for this machine's BackendServerIP.
Please run setup on this machine and modify the first page
of the general settings.
2008-04-13 10:04:44.162 Using runtime prefix = /usr, libdir = /usr/lib
2008-04-13 10:04:44.241 Empty LocalHostName.
2008-04-13 10:04:44.261 Using localhost value of moe
2008-04-13 10:04:44.337 New DB connection, total: 1
2008-04-13 10:04:44.376 Connected to database 'mythconverg' at host: localhost
2008-04-13 10:04:44.386 Closing DB connection named 'DBManager0'
2008-04-13 10:04:44.395 Connected to database 'mythconverg' at host: localhost
2008-04-13 10:04:44.401 New DB connection, total: 2
2008-04-13 10:04:44.404 Connected to database 'mythconverg' at host: localhost
2008-04-13 10:04:44.410 Current Schema Version: 1214
No setting found for this machine's BackendServerIP.
Please run setup on this machine and modify the first page
of the general settings
====================================

I'm starting to think these debian "atrpms" packages might be the
problem. the clients are other distros (fedora, arch), and maybe
there's some incompatibility with the atrpms mythtv???
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mythtv_arizona at yahoo

Apr 20, 2008, 5:25 PM

Post #13 of 24 (8256 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

--- starcycle <starcycle [at] gmail> wrote:

> god this is frustrating. out of curiosity I launched
> mythfrontend on
> the server, and that works fine. so apparently it's
> a network problem?
>
> the ports should already be accessible to the LAN,
> but I explicitly
> opened them anyway, 3066 for mysql and 6543:6544 for
> mythtv. but still
> no go.
>
> I followed all the tutorials for allowing network
> access in
> /etc/mysql/my.cnf (commenting out # localhost,
> etc.), and added
> askip-innodb and set-variable=thread_stack=256k as
> specified for
> connection problems in the mythtv doc, but I must
> have missed
> something. this is really kicking my butt! <grr>
> something is
> configured wrong somewhere to allow network access,
> but i'm out of
> ideas.
>
> do you need to specify anything for mythtv or mysql
> in
> /etc/hosts.allow and .deny? I didn't think you need
> to for mysql at
> least.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
>
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>

When you setup the database, how did you grant
permissions. Something like this will work but it has
no security so you'll want to do this as a test.

mysql> grant all on mythconverg.* to mythtv@"%"
identified by "mythtv";
mysql> flush privileges;


____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

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


newbury at mandamus

Apr 20, 2008, 5:38 PM

Post #14 of 24 (8253 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

starcycle wrote:

> 2008-04-20 14:23:50.046 Testing network connectivity to 192.168.0.103
> 2008-04-20 14:23:50.106 Unable to connect to database!
> 2008-04-20 14:23:50.107 Driver error was [1/2013]:
> QMYSQL3: Unable to connect
> Database error was:

Using perror:
root [at] myt ~]# perror 1
OS error code 1: Operation not permitted


Which means it is likely that /tmp is owned by root:root and mysql
cannot talk to the socket.

Edit the /etc/my.cnf file to point mysql to somewhere it can write to..
This is the top of my file:

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql

/Var/lib/mysql is owned by mysql and of course it can write there!

Geoff

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


starcycle at gmail

Apr 20, 2008, 5:51 PM

Post #15 of 24 (8260 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On Sun, Apr 20, 2008 at 8:25 PM, Steve Wilson <mythtv_arizona [at] yahoo> wrote:

> When you setup the database, how did you grant
> permissions. Something like this will work but it has
> no security so you'll want to do this as a test.
>
> mysql> grant all on mythconverg.* to mythtv@"%"
> identified by "mythtv";
> mysql> flush privileges;

i've tried all of those options, no change.

mythtv can log in to the database, but it can't seem to do anything. I
tried the grant all comman as mythtv and it said access to mythconverg
was denied to mythtv [at] localhost shouldn't it be able to make those
modifications?


On Sun, Apr 20, 2008 at 8:38 PM, R. G. Newbury <newbury [at] mandamus> wrote:
>
> Using perror:
> root [at] myt ~]# perror 1
> OS error code 1: Operation not permitted
>
>
> Which means it is likely that /tmp is owned by root:root and mysql
> cannot talk to the socket.
>
> Edit the /etc/my.cnf file to point mysql to somewhere it can write to..
> This is the top of my file:
>
> [mysqld]
> datadir=/var/lib/mysql
> socket=/var/lib/mysql/mysql.sock
> user=mysql
>
> /Var/lib/mysql is owned by mysql and of course it can write there!
>
> Geoff

root [at] mo:~ # perror l
OS error code 0: Success

datadir=/var/lib/mysql
socket=/var/run/mysqld/mysqld.sock
user=mysql

root [at] mo:~ # ll -d /var/lib/mysql
drwxr-xr-x 7 mysql mysql 408 2008-04-20 19:19 /var/lib/mysql

root [at] mo:~ # ll -d /var/run/mysqld
drwxr-xr-x 2 mysql root 112 2008-04-20 19:19 /var/run/mysqld


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


starcycle at gmail

Apr 20, 2008, 5:56 PM

Post #16 of 24 (8234 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On Sun, Apr 20, 2008 at 8:51 PM, starcycle <starcycle [at] gmail> wrote:
>
> root [at] mo:~ # perror l
> OS error code 0: Success

oh shoot - I guess that was supposed to be perror 1. :p

root [at] mo:~ # perror 1
OS error code 1: Operation not permitted

okay - so perhaps changing /var/run/mysqld to /var/lib/mysql would
work? trying ... thanks
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


starcycle at gmail

Apr 20, 2008, 6:06 PM

Post #17 of 24 (8233 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On Sun, Apr 20, 2008 at 8:56 PM, starcycle <starcycle [at] gmail> wrote:
> On Sun, Apr 20, 2008 at 8:51 PM, starcycle <starcycle [at] gmail> wrote:
> >
> > root [at] mo:~ # perror l
> > OS error code 0: Success
>
> oh shoot - I guess that was supposed to be perror 1. :p
>
> root [at] mo:~ # perror 1
>
> OS error code 1: Operation not permitted
>
> okay - so perhaps changing /var/run/mysqld to /var/lib/mysql would
> work? trying ... thanks
>

Nope, didn't work. Also, that wouldn't explain why the localhost can
access the database, would it? only the networked clients can't access
it.

damn, i'm about ready to give up. nothing on linux has ever given me
this much trouble. it doesn't make sense -- something apparently is
just fubared.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


gravityhammer at gmail

Apr 20, 2008, 6:15 PM

Post #18 of 24 (8241 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On Sun, Apr 20, 2008 at 9:06 PM, starcycle <starcycle [at] gmail> wrote:
> On Sun, Apr 20, 2008 at 8:56 PM, starcycle <starcycle [at] gmail> wrote:
> > On Sun, Apr 20, 2008 at 8:51 PM, starcycle <starcycle [at] gmail> wrote:
> > >
> > > root [at] mo:~ # perror l
> > > OS error code 0: Success
> >
> > oh shoot - I guess that was supposed to be perror 1. :p
> >
> > root [at] mo:~ # perror 1
> >
> > OS error code 1: Operation not permitted
> >
> > okay - so perhaps changing /var/run/mysqld to /var/lib/mysql would
> > work? trying ... thanks
> >
>
> Nope, didn't work. Also, that wouldn't explain why the localhost can
> access the database, would it? only the networked clients can't access
> it.
>
> damn, i'm about ready to give up. nothing on linux has ever given me
> this much trouble. it doesn't make sense -- something apparently is
> just fubared.
>

Look at your my.cnf on your backend. What does it say in this section?
# security:
# using "localhost" in connects uses sockets by default
# skip-networking
# bind-address = 127.0.0.1
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


starcycle at gmail

Apr 20, 2008, 6:32 PM

Post #19 of 24 (8220 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

omg - I can't believe it. i think it was the /etc/hosts.allow file. I
added mysqld: <lan IP> and now it's working. :-o I read something
authoritative on linuxquestions about 12 hours ago saying mysql didn't
use tcp wrappers so I just ruled it out -- i guess that was wrong!
well, at least it's working now. I can't believe it was hosts.allow!!!

thanks to everyone for your help & patient replies.

cheers

On Sun, Apr 20, 2008 at 9:15 PM, Phil Bridges <gravityhammer [at] gmail> wrote:
>
> On Sun, Apr 20, 2008 at 9:06 PM, starcycle <starcycle [at] gmail> wrote:
> > On Sun, Apr 20, 2008 at 8:56 PM, starcycle <starcycle [at] gmail> wrote:
> > > On Sun, Apr 20, 2008 at 8:51 PM, starcycle <starcycle [at] gmail> wrote:
> > > >
> > > > root [at] mo:~ # perror l
> > > > OS error code 0: Success
> > >
> > > oh shoot - I guess that was supposed to be perror 1. :p
> > >
> > > root [at] mo:~ # perror 1
> > >
> > > OS error code 1: Operation not permitted
> > >
> > > okay - so perhaps changing /var/run/mysqld to /var/lib/mysql would
> > > work? trying ... thanks
> > >
> >
> > Nope, didn't work. Also, that wouldn't explain why the localhost can
> > access the database, would it? only the networked clients can't access
> > it.
> >
> > damn, i'm about ready to give up. nothing on linux has ever given me
> > this much trouble. it doesn't make sense -- something apparently is
> > just fubared.
> >
>
> Look at your my.cnf on your backend. What does it say in this section?
> # security:
> # using "localhost" in connects uses sockets by default
> # skip-networking
> # bind-address = 127.0.0.1
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


mikep at randomtraveller

Apr 21, 2008, 3:29 AM

Post #20 of 24 (8178 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

starcycle wrote:
>
> ====================================
> 2008-04-12 19:59:14.972 Using runtime prefix = /usr, libdir = /usr/lib
> 2008-04-12 19:59:15.052 Empty LocalHostName.
> 2008-04-12 19:59:15.265 Using localhost value of moe
> 2008-04-12 19:59:15.403 New DB connection, total: 1
> 2008-04-12 19:59:15.454 Connected to database 'mythconverg' at host: localhost
> 2008-04-12 19:59:15.466 Closing DB connection named 'DBManager0'
> 2008-04-12 19:59:15.469 Connected to database 'mythconverg' at host: localhost
> 2008-04-12 19:59:15.524 New DB connection, total: 2
> 2008-04-12 19:59:15.526 Connected to database 'mythconverg' at host: localhost
> 2008-04-12 19:59:15.538 Current Schema Version:
> 2008-04-12 19:59:15.540 DataDirectProcessor::FixProgramIDs() -- begin
> 2008-04-12 19:59:15.543 New DB DataDirect connection
> 2008-04-12 19:59:15.546 Connected to database 'mythconverg' at host: localhost
> 2008-04-12 19:59:15.597 DB Error (Fixing program ids in recorded):

...amongst other things. If you look at the snippet above, this indicates that
you have not set the ip address for mythbackend *in the back end machine*. What
is shown above is the default 'localhost'. If this value is not set correctly,
it's not surprising you are getting connection problems from other machines.

mythtvsetup->general (first page).

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


starcycle at gmail

Apr 21, 2008, 5:51 AM

Post #21 of 24 (8180 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On Mon, Apr 21, 2008 at 6:29 AM, Mike Perkins
<mikep [at] randomtraveller> wrote:
> starcycle wrote:
> >
> > ====================================
> > 2008-04-12 19:59:14.972 Using runtime prefix = /usr, libdir = /usr/lib
> > 2008-04-12 19:59:15.052 Empty LocalHostName.
> > 2008-04-12 19:59:15.265 Using localhost value of moe
> > 2008-04-12 19:59:15.403 New DB connection, total: 1
> > 2008-04-12 19:59:15.454 Connected to database 'mythconverg' at host: localhost
> > 2008-04-12 19:59:15.466 Closing DB connection named 'DBManager0'
> > 2008-04-12 19:59:15.469 Connected to database 'mythconverg' at host: localhost
> > 2008-04-12 19:59:15.524 New DB connection, total: 2
> > 2008-04-12 19:59:15.526 Connected to database 'mythconverg' at host: localhost
> > 2008-04-12 19:59:15.538 Current Schema Version:
> > 2008-04-12 19:59:15.540 DataDirectProcessor::FixProgramIDs() -- begin
> > 2008-04-12 19:59:15.543 New DB DataDirect connection
> > 2008-04-12 19:59:15.546 Connected to database 'mythconverg' at host: localhost
> > 2008-04-12 19:59:15.597 DB Error (Fixing program ids in recorded):
>
> ...amongst other things. If you look at the snippet above, this indicates that
> you have not set the ip address for mythbackend *in the back end machine*. What
> is shown above is the default 'localhost'. If this value is not set correctly,
> it's not surprising you are getting connection problems from other machines.
>

The point is, everything was set up correctly on both backend and all
the frontends. The database was only refusing connection at the level
of tcp wrappers. This seems to be a security feature in debian,
probably turned off or pre-configured in the myth-specific distros:

/usr/share/doc/mysql-server-5.0/README.Debian:

'For security reasons, the Debian package has enabled networking only on the
loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with
"netstat -tlnp" where it is listening. If your connection is aborted
immediately see if "mysqld: all" or similar is in /etc/hosts.allow and read
hosts_access(5).'

so if anyone is ever having problems connecting to a debian backend,
make sure to check the host access files, and add mysqld : <lan IPs>
(or whatever) to allow access.

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


gravityhammer at gmail

Apr 21, 2008, 5:58 AM

Post #22 of 24 (8171 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On Mon, Apr 21, 2008 at 8:51 AM, starcycle <starcycle [at] gmail> wrote:
> On Mon, Apr 21, 2008 at 6:29 AM, Mike Perkins
> <mikep [at] randomtraveller> wrote:
> > starcycle wrote:
> > >
> > > ====================================
> > > 2008-04-12 19:59:14.972 Using runtime prefix = /usr, libdir = /usr/lib
> > > 2008-04-12 19:59:15.052 Empty LocalHostName.
> > > 2008-04-12 19:59:15.265 Using localhost value of moe
> > > 2008-04-12 19:59:15.403 New DB connection, total: 1
> > > 2008-04-12 19:59:15.454 Connected to database 'mythconverg' at host: localhost
> > > 2008-04-12 19:59:15.466 Closing DB connection named 'DBManager0'
> > > 2008-04-12 19:59:15.469 Connected to database 'mythconverg' at host: localhost
> > > 2008-04-12 19:59:15.524 New DB connection, total: 2
> > > 2008-04-12 19:59:15.526 Connected to database 'mythconverg' at host: localhost
> > > 2008-04-12 19:59:15.538 Current Schema Version:
> > > 2008-04-12 19:59:15.540 DataDirectProcessor::FixProgramIDs() -- begin
> > > 2008-04-12 19:59:15.543 New DB DataDirect connection
> > > 2008-04-12 19:59:15.546 Connected to database 'mythconverg' at host: localhost
> > > 2008-04-12 19:59:15.597 DB Error (Fixing program ids in recorded):
> >
> > ...amongst other things. If you look at the snippet above, this indicates that
> > you have not set the ip address for mythbackend *in the back end machine*. What
> > is shown above is the default 'localhost'. If this value is not set correctly,
> > it's not surprising you are getting connection problems from other machines.
> >
>
> The point is, everything was set up correctly on both backend and all
> the frontends. The database was only refusing connection at the level
> of tcp wrappers. This seems to be a security feature in debian,
> probably turned off or pre-configured in the myth-specific distros:
>
> /usr/share/doc/mysql-server-5.0/README.Debian:
>
> 'For security reasons, the Debian package has enabled networking only on the
> loop-back device using "bind-address" in /etc/mysql/my.cnf. Check with
> "netstat -tlnp" where it is listening. If your connection is aborted
> immediately see if "mysqld: all" or similar is in /etc/hosts.allow and read
> hosts_access(5).'
>
> so if anyone is ever having problems connecting to a debian backend,
> make sure to check the host access files, and add mysqld : <lan IPs>
> (or whatever) to allow access.
>
> regards
>
>

Or, you could comment out the "bind-address" in my.cnf and restart mysql.
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


starcycle at gmail

Apr 21, 2008, 6:05 AM

Post #23 of 24 (8187 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

On Mon, Apr 21, 2008 at 8:58 AM, Phil Bridges <gravityhammer [at] gmail> wrote:
>
>
> Or, you could comment out the "bind-address" in my.cnf and restart mysql.
>

But like I said, I had already done that. ;) Everything regarding
mysql and mythtv was set up properly, mysql was just being blocked by
tcp wrappers. On debian systems, you have to add mysqld: all (or IP,
host, etc.) to /etc/hosts.allow.

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


mache at creeger

Apr 21, 2008, 8:07 PM

Post #24 of 24 (8188 views)
Permalink
Re: mythfrontend can't connect to backend/database [In reply to]

At 06:05 AM 4/21/2008, starcycle wrote:
>On Mon, Apr 21, 2008 at 8:58 AM, Phil Bridges <gravityhammer [at] gmail> wrote:
> >
> >
> > Or, you could comment out the "bind-address" in my.cnf and restart mysql.
> >
>
>But like I said, I had already done that. ;) Everything regarding
>mysql and mythtv was set up properly, mysql was just being blocked by
>tcp wrappers. On debian systems, you have to add mysqld: all (or IP,
>host, etc.) to /etc/hosts.allow.
>
>regards

Did you do this?


Finally, if you just want to restrict by IP subnet (in this example,
the 192.168.1. network):

$ mysql -u root mythconverg
mysql> grant all on mythconverg.* to mythtv@"192.168.1.%" identified
by "mythtv";
mysql> flush privileges;

See http://www.mythtv.org/docs/mythtv-HOWTO-6.html

-- Mache

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.