[mythtv-users] Linux frontend database connection problems - FIXED

R. G. Newbury newbury at mandamus.org
Mon Aug 20 15:38:50 UTC 2007

Piers Kittel wrote:
> Geoff,
> Thanks *so* much for replying - it is much appreciated!
>> Have you started at first principles?
> Yeah, but I'll do it again.
>> Can you cross ping between the machines?
> Yes
>> Can you ssh from the frontends?  Needs /etc/host entries to be  
>> correct.
> Yes
>> Can you nsf mount from the frontends? Needs stuff setup and running on
>> the backend machine. If nsf works, then you have proved that all the
>> required TCPIP is correct.
> Assume you mean NFS - yes, as one of the frontend is a diskless  
> frontend, and accesses its data via NFS which is on the backend.
>> Now that leaves mysql access.
>> Make sure mysqld is OFF on each frontend and running on the backend.
> MySQL is not running on the frontends
>> Make sure that the mysql ports are open.  Fedora has a little program
>> called 'lokkit' which is made for port opening/checking.
> MySQL should be working, after all, the OS X frontends doesn't have  
> any problems.  I use a program called nmap, and it reports:
> piers at hinata:~$ nmap destiny
> Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2007-08-19 13:13
> Interesting ports on destiny (
> Not shown: 1670 closed ports
> 22/tcp   open  ssh
> 53/tcp   open  domain
> 80/tcp   open  http
> 111/tcp  open  rpcbind
> 443/tcp  open  https
> 665/tcp  open  unknown
> 2049/tcp open  nfs
> 3306/tcp open  mysql
> 6543/tcp open  mythtv
> 6544/tcp open  mythtv
> Nmap finished: 1 IP address (1 host up) scanned in 0.279 seconds
> piers at hinata:~$
> As we can see, there's a mysql entry in the list - as well as 2  
> MythTV ports.
> (FYI, Hinata = the diskless frontend, destiny is the backend)
>> The backend needs a unique name/IP. Set it in each frontend in
>> /etc/hosts. DHCP is a real problem here: use static IP addresses.
> The backend and the diskless frontend both use static IP addresses.
>> Mythtv-setup on the backend cannot use !!!
> Correct - remember the OS X frontends works fine.
>> At this point you should be able to ssh into the back from the fronts
>> and vice versa. If you set up nfs then you should be able to mount the
>> storage partition from the frontends.
> Have done...
> piers at hinata:~$ df -h
> Filesystem            Size  Used Avail Use% Mounted on
> tmpfs                 126M     0  126M   0% /lib/init/rw
> tmpfs                 126M     0  126M   0% /dev/shm
> rootfs                9.2G  4.2G  4.6G  48% /
> destiny.10sca.intranet:/video
>                        298G   69G  230G  23% /video
> piers at hinata:~$
>> Create a mysql user for each frontend machine by amending and re- 
>> running
>> the mc.sql script which is in mythtv/database.
>> ....(I'm not sure if mysql will work from multiple frontends using the
>> same mysql user.)
> Can't be a problem with the server, because all OS X frontends works  
> fine - just not the Linux frontends.  Did this anyway, and didn't work.
>> At this point, running 'select host,user,password from user;' on the
>> mysqld server (backend) machine, as root mysql user should list the
>> various frontend machines by name, the mysql users and show the  
>> hash of
>> the password. At this point you should be able to log into the mysql
>> server from each frontend and run mysql queries as the frontend's user
>> and as the root mysql user. If you cannot do this, myth will not be  
>> able
>> to either.....
> I can connect to the mysql database via the frontend using the mysql- 
> client software:
> piers at hinata:~$ mysql -h -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 73
> Server version: 5.0.32-Debian_7etch1-log Debian etch distribution
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
> mysql> quit
> Bye
> piers at hinata:~$
> It works fine!
>> Run 'find' to check for duplicate copies of mysql.txt on each machine.
>> Fix the /home/mythtv frontend copy of mysql.txt to refer to the  
>> correct
>> backend IP addess and the frontend mysql user name.
> Have deleted every instance of mysql.txt on the frontend, and re-ran  
> the frontend, and entered the exact same settings I used to log onto  
> the server above and it doesn't work!  I am much more confident the  
> SQL driver mythtv uses is broken somehow.
> 2007-08-19 13:39:53.323 Writing settings file /home/piers/.mythtv/ 
> mysql.txt
> 2007-08-19 13:39:53.338 Unable to connect to database!
> 2007-08-19 13:39:53.339 No error type from QSqlError?  Strange...
> QSqlQuery::exec: database not open
> QSqlQuery::exec: database not open
> 2007-08-19 13:39:53.392 DB Error (KickDatabase):
> Query was:
> No error type from QSqlError?  Strange...
> 2007-08-19 13:39:53.448 Failed to init MythContext, exiting.
> Hmm... libqt3-mt-mysql somehow got uninstalled (probably in the dist- 
> upgrade) - reinstalled it, now mythfrontend works, but very slowly  
> and video doesn't work, but that's another thread :)
>> And remember:
>> If at first you don't succeed, sky-diving is nor recommended.
> Good advice.  :)
> Thanks for all your help and for your time!  It is much appreciated :)

Try a 'yum install qt-MySQL'.   That library seems to be needed and 
sometimes gets miseed, probably because the script calls it 'qt-mysql' 
like one of the libraries which normally gets installed.

Very tricky, being case sensitive.


        Helping with the HTTP issue
<a href="http://www.w3.org/Protocols/">HTTP</a>

More information about the mythtv-users mailing list