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

Mailing List Archive: MythTV: Users

Can't connect to MySQL server on '192.168.0.100'

 

 

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


akaburtan at gmail

Jan 13, 2013, 2:00 PM

Post #1 of 5 (1219 views)
Permalink
Can't connect to MySQL server on '192.168.0.100'

Hi,

I'm running mythbackend 0.26 on my server with the IP 192.168.0.100. I'm
also running XBMC 12 RC3 as a frontend on the same server. This works fine
when using "localhost" in any configuration.

Now I want to be able to access mythbackend from the network.
Thus I first configured MySQL to allow access from the network.
This works fine on any machine in the network using the following command:

mysql -u mythtv -p -h 192.168.0.100 mythconverg

However, mythbackend always fails to connect to the database when not using
localhost:
Here is my config.xml which is loaded:

<Configuration>
<LocalHostName>192.168.0.100</
LocalHostName>
<Database>
<PingHost>1</PingHost>
<Host>192.168.0.100</Host>
<UserName>mythtv</UserName>
<Password>mythtv</Password>
<DatabaseName>mythconverg</DatabaseName>
<Port>6543</Port>
</Database>
<WakeOnLAN>
<Enabled>0</Enabled>
<SQLReconnectWaitTime>0</SQLReconnectWaitTime>
<SQLConnectRetry>5</SQLConnectRetry>
<Command>echo 'WOLsqlServerCommand not set'</Command>
</WakeOnLAN>
<UPnP>
<UDN>
<MediaRenderer>{5f8733f0-ec13-4ce6-82f0-be05bb11455</MediaRenderer>
</UDN>
</UPnP>
</Configuration>

When connecting to localhost with mythbackend, I cannot reach the service
with mythfrontend over the network, which imho is related to mysql.

Thanks for any suggestions.
Best regards,
Frederik


mythtv at comhem

Jan 13, 2013, 2:32 PM

Post #2 of 5 (1196 views)
Permalink
Re: Can't connect to MySQL server on '192.168.0.100' [In reply to]

On 2013-01-13 23:00, Frederik wrote:
> Hi,
>
> I'm running mythbackend 0.26 on my server with the IP 192.168.0.100. I'm
> also running XBMC 12 RC3 as a frontend on the same server. This works
> fine when using "localhost" in any configuration.
>
> Now I want to be able to access mythbackend from the network.
> Thus I first configured MySQL to allow access from the network.
> This works fine on any machine in the network using the following command:
>
> mysql -u mythtv -p -h 192.168.0.100 mythconverg
>
> However, mythbackend always fails to connect to the database when not
> using localhost:
> Here is my config.xml which is loaded:
>
> <Configuration>
> <LocalHostName>192.168.0.100</
> LocalHostName>
> <Database>
> <PingHost>1</PingHost>
> <Host>192.168.0.100</Host>
> <UserName>mythtv</UserName>
> <Password>mythtv</Password>
> <DatabaseName>mythconverg</DatabaseName>
> <Port>6543</Port>

You should enter the port used by MySQL here (usually 3306). 6543 is
used by mythbackend.

> </Database>
> <WakeOnLAN>
> <Enabled>0</Enabled>
> <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
> <SQLConnectRetry>5</SQLConnectRetry>
> <Command>echo 'WOLsqlServerCommand not set'</Command>
> </WakeOnLAN>
> <UPnP>
> <UDN>
> <MediaRenderer>{5f8733f0-ec13-4ce6-82f0-be05bb11455</MediaRenderer>
> </UDN>
> </UPnP>
> </Configuration>
>
> When connecting to localhost with mythbackend, I cannot reach the
> service with mythfrontend over the network, which imho is related to mysql.
>
> Thanks for any suggestions.
> Best regards,
> Frederik

Fix the MySQL port above and you should be better off. Remember to also
change the IP to 192.168.0.100 in mythtv-setup on your master backend.

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


keemllib at gmail

Jan 13, 2013, 2:40 PM

Post #3 of 5 (1193 views)
Permalink
Re: Can't connect to MySQL server on '192.168.0.100' [In reply to]

On 01/13/2013 04:00 PM, Frederik wrote:
...

Hi;

Remember that there are two places to consider. The config.xml file
so your programs can find the database and start.

And the backend configuration itself, where you probably have
192.168.0.100 as the Backend Server IP and Master Server IP -
and like the names say, they must be IP addresses.

As for config.xml:

On your backend, I'd expect to see (in part):

<LocalHostName>my-unique-identifier-goes-here</LocalHostName> # you shouldn't need to change this
<PingHost>0</PingHost> # the backend needn't ping itself
<Host>localhost</Host> # don't use the 192... address here
<Port>3306</Port>

And that's on *all* copies of the file ~/.mythtv/config.xml and
~mythtv/.mythtv/config.xml (or wherever your distribution puts
the files.)

On your remote frontend, change the <host>localhost</host> to the true
hostname of your db/backend, or you could use 192.168.0.100 if
you don't have a hostname defined for it somewhere. Also, change
the <PingHost>0</PingHost> to 1.

All of these changes can be done with the GUIs.

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


akaburtan at gmail

Jan 13, 2013, 3:01 PM

Post #4 of 5 (1194 views)
Permalink
Re: Can't connect to MySQL server on '192.168.0.100' [In reply to]

Thanks very much!
Got it working now. I just did not change the master-backend IP from
127.0.0.1 to 192.168.0.100.
:-)

2013/1/13 Bill Meek <keemllib [at] gmail>

> On 01/13/2013 04:00 PM, Frederik wrote:
> ...
>
> Hi;
>
> Remember that there are two places to consider. The config.xml file
> so your programs can find the database and start.
>
> And the backend configuration itself, where you probably have
> 192.168.0.100 as the Backend Server IP and Master Server IP -
> and like the names say, they must be IP addresses.
>
> As for config.xml:
>
> On your backend, I'd expect to see (in part):
>
> <LocalHostName>my-unique-**identifier-goes-here</**LocalHostName> # you
> shouldn't need to change this
> <PingHost>0</PingHost> # the backend needn't ping itself
> <Host>localhost</Host> # don't use the 192... address here
> <Port>3306</Port>
>
> And that's on *all* copies of the file ~/.mythtv/config.xml and
> ~mythtv/.mythtv/config.xml (or wherever your distribution puts
> the files.)
>
> On your remote frontend, change the <host>localhost</host> to the true
> hostname of your db/backend, or you could use 192.168.0.100 if
> you don't have a hostname defined for it somewhere. Also, change
> the <PingHost>0</PingHost> to 1.
>
> All of these changes can be done with the GUIs.
>
> --
> Bill
>
> ______________________________**_________________
> mythtv-users mailing list
> mythtv-users [at] mythtv
> http://www.mythtv.org/mailman/**listinfo/mythtv-users<http://www.mythtv.org/mailman/listinfo/mythtv-users>
>


keemllib at gmail

Jan 13, 2013, 3:22 PM

Post #5 of 5 (1194 views)
Permalink
Re: Can't connect to MySQL server on '192.168.0.100' [In reply to]

On 01/13/2013 05:01 PM, Frederik wrote:
> Thanks very much!
> Got it working now. I just did not change the master-backend IP from
> 127.0.0.1 to 192.168.0.100.
> :-)

Glad to hear it's working, but as both Jonatan and I mentioned, your
port number in config.xml was wrong too. If you want to post your
frontend and backend copies of config.xml as well as the contents
of Backend Server IP and Master Server IP, I'm sure someone will
comment on them. Be sure to label everything and use the full names.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://www.mythtv.org/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.