You are not logged in.

#1 2008-01-07 02:47:13

fatalfurry
Member
Registered: 2007-10-06
Posts: 9

mythtv cannot connect to mysql db

i went through the mythtv setup and everything looked good. I restarted my computer. started the mythbackend and I get this error

2008-01-06 20:41:45.911 Using runtime prefix = /usr
2008-01-06 20:41:46.024 New DB connection, total: 1
2008-01-06 20:41:46.025 Unable to connect to database!
2008-01-06 20:41:46.025 Driver error was [1/2003]:
QMYSQL3: Unable to connect
Database error was:
Can't connect to MySQL server on '192.168.1.50' (111)
QSqlQuery::exec: database not open
QSqlQuery::exec: database not open
2008-01-06 20:41:46.075 DB Error (KickDatabase):
Query was:
SELECT NULL;
No error type from QSqlError?  Strange...
2008-01-06 20:41:46.125 Failed to init MythContext, exiting.

my ip is 192.168.1.50 so im not sure why it will not let me connect.

Offline

#2 2008-01-07 03:29:23

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: mythtv cannot connect to mysql db

Usually the settings for MySQL are done to the address localhost (127.0.0.1) that may be your problem.

R.

Offline

#3 2008-01-07 04:06:16

fatalfurry
Member
Registered: 2007-10-06
Posts: 9

Re: mythtv cannot connect to mysql db

I changed it to 127.0.0.1 and it gives the same error but 127.0.0.1 instead of 192.168.1.50

Offline

#4 2008-01-07 08:10:53

xxxspuddy
Member
Registered: 2007-05-15
Posts: 57

Re: mythtv cannot connect to mysql db

Is mysql actually running?  It looks like it didn't start on boot.  Did you add 'mysqld' to the daemons list in /etc/rc.conf?


A temporary file is just a pipe with an attitude and a will to live.

Offline

#5 2008-01-07 12:33:53

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: mythtv cannot connect to mysql db

Funny, I had he same thought as xxxspuddy lol
If you make changes to your mysql settings (configs) make sure your next step is /etc/rc.d/mysql restart
Also add mysql to the daemons in your /etc/rc.conf

R.

Offline

#6 2008-01-07 14:47:35

fatalfurry
Member
Registered: 2007-10-06
Posts: 9

Re: mythtv cannot connect to mysql db

yes and yes
I also thought of that it is in rc.conf and i double checked that it was started with /etc/rc.d/mysqld restart. I tested it again and the same error comes up.

Offline

#7 2008-01-07 15:33:58

sjg
Member
From: UK
Registered: 2007-02-10
Posts: 63

Re: mythtv cannot connect to mysql db

Have you tried entering "localhost" instead of "127.0.0.1"?

I have no idea why this should make a difference, but I had a similar problem on a recent Myth setup and it worked for me.

Offline

#8 2008-01-07 17:19:54

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: mythtv cannot connect to mysql db

Yeah, I remember something about that. 127.0.0.1 would mean Mysql uses a TCP connection and localhost would make it use a socket, or something like that.


1000

Offline

#9 2008-01-07 17:21:28

xxxspuddy
Member
Registered: 2007-05-15
Posts: 57

Re: mythtv cannot connect to mysql db

Good point, by default mysql denies connections from (external) IP addresses, you need to change one of the config files, can't remember offhand which one and what to change (sorry!) but I will check my box when I get the chance.  This might help in the meantime:

http://forum.swsoft.com/showthread.php?t=39709

SJG, you might want to check that out too if you ever plan to connect remote frontends.


A temporary file is just a pipe with an attitude and a will to live.

Offline

#10 2008-01-07 17:51:22

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: mythtv cannot connect to mysql db

Also, for the IP connection approach, Mysql is compiled with support for tcp_wrappers, so make sure to edit /etc/hosts.allow.


1000

Offline

#11 2008-01-09 00:10:14

fatalfurry
Member
Registered: 2007-10-06
Posts: 9

Re: mythtv cannot connect to mysql db

thanks guys putting the localhost worked.

Offline

Board footer

Powered by FluxBB