Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: mythtv can't connect to database

  1. #11
    Join Date
    Mar 2008
    Beans
    1,086

    Re: mythtv can't connect to database

    First off, you'll notice your bind-address in my.cnf has been set to 127.0.0.1, rather than 192.168.2.12. Your MySQL server is therefore only listening to localhost. Anything (like your mythbackend service) that is trying to connect to the ip 192.168.2.12 isn't getting through. You'll want to fix this --edit the bind address to 192.168.2.12.

    After this, restart the mysql service, and you may in fact find mythbackend has now become startable as a service, because the script has been attempting to connect to MySQL on 192.168.2.12. You should also find that your backend and its mysql server can be logged into by Mythfrontends on other machines.

    Port 6543/6544 are the ports mythtv runs through. So if you're connecting on these ports, it's a good thing. 3306 on the other hand is MySQL's default port, and should not be accessible from "untrusted hosts". So if you're unable to log into that port, it's also a good thing.

    No conf file in /etc/init.d is also OK. Different distros do different things. But also check the launch script itself for mysqld for a SKIP line pertaining to networking. If there's nothing there, then there's nothing to worry about remarking out. My own particular "my.cnf" for MySQL 5.5 still includes a skip-networking line that had to be remmed out, as did my own particular init script. Not having these things is better.

  2. #12
    Join Date
    Jan 2013
    Beans
    10

    Re: mythtv can't connect to database

    Quote Originally Posted by klc5555 View Post
    First off, you'll notice your bind-address in my.cnf has been set to 127.0.0.1, rather than 192.168.2.12. Your MySQL server is therefore only listening to localhost. Anything (like your mythbackend service) that is trying to connect to the ip 192.168.2.12 isn't getting through. You'll want to fix this --edit the bind address to 192.168.2.12.

    After this, restart the mysql service, and you may in fact find mythbackend has now become startable as a service, because the script has been attempting to connect to MySQL on 192.168.2.12. You should also find that your backend and its mysql server can be logged into by Mythfrontends on other machines.
    OK, I did that. But it didn't seem to fix anything. I just re-booted and the backend is not running. Still, I have to go to the CLI and type 'mythbackend -d' (no sudo required).

  3. #13
    Join Date
    Mar 2008
    Beans
    1,086

    Re: mythtv can't connect to database

    Quote Originally Posted by kcog View Post
    OK, I did that. But it didn't seem to fix anything. I just re-booted and the backend is not running. Still, I have to go to the CLI and type 'mythbackend -d' (no sudo required).
    Well this surprising. But anyway...

    Has mythtv setup been redone to have the backend use 192.168.2.12 rather than localhost? If you're starting by hand from a terminal, you may also want to use the argument --logfile /var/log/mythtv/mythbackend.log to have it write to the log in this circumstance too. (Though run as user, mythbackend may not have permissions to write to this log. You may have to indicate a path in userspace.)

    Is the backend (however started) and the database accessible on 192.168.2.12 rather than localhost by the various frontends? Most importantly, via this supposedly running mythbackend with user credentials, can a signal be got through whatever TV tuner you're using and out Mythfrontend to be viewed? (If not, does it work when the backend is started sudo from a prompt?) If there is (however started) a running backend, a running frontend, and an accessible mythconverg db, all talking through 192.168.2.12 and producing a viewable signal, then we're down to essentially one problem to solve. If the chain is breaking down at some point, then we're back to the logs (backend, frontend, and mysql) to figure out where it's going awry.

  4. #14
    Join Date
    Jan 2013
    Beans
    10

    Re: mythtv can't connect to database

    Quote Originally Posted by klc5555 View Post
    Well this surprising. But anyway...
    So as I've said I *really* appreciate your help. This has been great - I feel like I have my own personal tech support guy through this, and I know you post on many other threads, too. Big Kudos to you.

    But I'm getting discouraged, and I'd like to start fresh and re-do. My install is fairly young anyway, so there's not much to lose (nothing actually - all my media are on a server, there aren't even any bookmarks saved on this machine) except the time it takes to install, set up and scan channels (which I estimate would only take a few hours all in if I only knew what I was doing). I feel like it would be faster at this stage to just do it right from the git-go than to chase down what went wrong.

    So with that said, can you recommend a way to get the bare minimum necessary to make a mythtv box with front & back ends on the same box but with the ability to log in from other devices in the future (currently I don't have any other front end hardware, but I want that capability.)

    What I did is this:
    1) install the Ubuntu mini.iso distro using unetbootin & a USB stick, with absolutely no additional options installed. Just a bare Ubuntu terminal console, no desktop, nothing (well I did select OpenSSH so I could log in remotely). I want the most bare, minimalist resource-friendly setup that will run MythTV well. (honestly it's unfortunate that a GUI desktop is required to run the backend setup, especially since many backends are just servers of sorts... having seen the setup utility there's no reason it couldn't run in a terminal window.)
    2) apt-get install tasksel
    3) using tasksel, install

    • mythbuntu-desktop (Mythbuntu additional roles )
    • mythbuntu-frontend (Mythbuntu frontend )
    • mythbuntu-backend-master (Mythbuntu master backend )
    • mythbuntu-backend-slave (Mythbuntu slave backend)

    5) During the installation (via tasksel) of those task-packages, I'm prompted to fill out several MySQL settings like localhost vs. IP#, root password, etc. (I wonder if this is where things go wrong?)
    4) proceed with setup of myth backend, & front end, try to get Myth all set and working (both back and front ends).

    Is there a better way (not necessarily easier)?
    Is there an easier way?
    Did I miss anything that should be installed?
    Should I install something else in place of one of those four things in the list above? (for example, some other desktop, and then just the myth front/back ends)?

    In the past, #4 was followed by installation of XBMC, before I had MythTV fully & properly functioning. This time I would make sure MythTV was working perfectly before messing with anything like XBMC.

    The reason why I used the mini.iso install rather than just the mythbuntu.iso, is that I want Ubuntu 12.10 Quantal Quetzal for XBMC reasons, and Mythbuntu is skipping over 12.10 (LTS releases only).

    Thanks again.
    EDIT: I forgot to mention, that I recently got a CableCard for my HDHomerun (was just running it for Clear QAM unencrypted channels up to now), which will necessitate a new run through the myth setup & channel scan, etc., so I figured I might as well start from scratch anyway.
    EDIT2: Maybe this post should be the start of a new thread...?
    Last edited by kcog; January 22nd, 2013 at 11:24 PM.

  5. #15
    Join Date
    Mar 2008
    Beans
    1,086

    Re: mythtv can't connect to database

    OK, well if you've decided to go new install...

    I can't see any advantage to go mini.iso unless you're configuring a backend-only machine. Admittedly Ubuntu has significant bloat and other annoyances associated with it, but Mythbuntu on a machine that is intended to function also as a frontend makes better sense than building it yourself from a mini distro. Certainly vastly easier, and it's been optimized to be a combo backend + frontend. You would simply need to check a box in the Mythbuntu Control Center, and fill in the IP in the backend setup to enable remote frontend connections.

    My own setup consists of a network of three backend-only machines and a variety of frontend-only machines that connect to them as necessary. The frontends are on Windows (using Mythtv player), three on Slackware + Mythtv and XBMC, one on Xubuntu + Mythtv, and also an Android tablet + Mythfrontend for Android. The three backends are all on Slackware, where X is only invoked when mythtv-setup needs running, and twm is used as the WM (very minimal and don't need a mouse). Certainly things would be neater for me if there were, say, an ncurses version of the Mythtv backend setup, but it's not like I'm capable of coding the thing.

    So in sum, I'd recommend, if your first machine is intended to be entertainment only (rather than a multipurpose desktop), and is intended to be a Mythtv master backend + frontend combo, to which backend other remote frontends are intended to eventually connect, then just go with plain-vanilla Mythbuntu. Get it running as a default localhost, and later change the one setting in the MCC and the ip in the backend and frontend setups to render it remotely connectable. Life is short; save the mini.iso build for when you're putting together the backend-only server sometime in the future.

    Just my .02. Go with what's simple, first. Add the complicated stuff later.

  6. #16
    Join Date
    Jan 2013
    Beans
    10

    Re: mythtv can't connect to database

    The main reason to go with the mini.iso is so I can get MythTV and Ubuntu 12.10. The script I use to install XBMC simply *nails* all my hardware drivers and settings and saves me a lot of grief and work, but it requires Ubuntu 12.10.

  7. #17
    Join Date
    Mar 2008
    Beans
    1,086

    Re: mythtv can't connect to database

    Quote Originally Posted by kcog View Post
    The main reason to go with the mini.iso is so I can get MythTV and Ubuntu 12.10. The script I use to install XBMC simply *nails* all my hardware drivers and settings and saves me a lot of grief and work, but it requires Ubuntu 12.10.
    Of course it does. It wouldn't be Ubuntu if it worked on more than one version

    OK then. Mythbuntu is mostly a stripped-down Xubuntu, but with its own variant of the XFCE environment, plus extra PVR-related drivers, firmware, tools, and vitamins.

    The straightforward way to get what you need on 12.10 would be to install a plain-vanilla Xubuntu. Set the machine up with one user account --your main user. Set it up on static ip. Rip out some of the more obvious things that will be useless for a dedicated PVR, if you wish, like games, graphical e-mail clients, most/all office apps/applets, etc. Install the "mythtv" meta-package and allow it to install to its defaults. It will create the mythtv user and ancillary claptrap. If you use a storage drive for myth recordings, make a mount point for it under the automatically created /var/lib/mythtv/ , mount your drive there, make sure the ownership all the way down to this storage drive and its files is mythtv:mythtv, permissions about 775. Put the mount point properly in fstab. And run the backend setup. When you can watch tv through the standard mythfrontend, like a standard Mythtv machine, then add XBMC, using your script.

    Your way with the mini.iso distro should also have worked, and will end up significantly leaner. Clearly your step 5) is where things got off the track. Also, you shouldn't strictly need mythbuntu-desktop (or even XFCE, which certainly is not low-resource any more), just X and a lightweight WM, particularly on a display where XBMC will eventually be the star, not Mythfrontend. If you like editing xinit.rc files (and who doesn't) you might prefer IceWM (which I use a lot on frontends) or possibly even fwvm or fluxbox. And your backend is intended to be a master backend (it will own the database; other machines will connect to it), so "mythbuntu-backend-slave" was also presumably unnecessary.

    Finally, the reason I asked whether in your current installation your backend was really running in a usable fashion as you believed (i.e. it could receive TV) when started from the CLI as your regular user without sudo, is that if I were confronted with that circumstance where the backend actually was functional for tuning/watching/recording when run as the normal user, then I would be strongly tempted to simply add
    Code:
    xterm -e /usr/bin/mythbackend -d --logfile /[wherever]
    to my startup apps in the XFCE (or derivative) desktop and call it a night. The way these things usually sort themselves out, after the machine has been running along for a few weeks, inspiration as to how to correct nagging little issues will strike with a slap to the forehead and untangling something like this will end up as an hour project some weekend.
    Last edited by klc5555; January 23rd, 2013 at 02:58 PM.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •