mythtv unable to access mysql in new 16.04 / mythtv install

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
darikehighbrow
Newcomer
Posts: 7
Joined: Thu Oct 02, 2014 3:12 pm
United States of America

mythtv unable to access mysql in new 16.04 / mythtv install

Post by darikehighbrow » Thu Sep 21, 2017 12:51 pm

I posted this in the Ubuntu forum but have not received any replies. Hopefully, someone here can help.

My old mythbuntu computer died so I decided to build a new home theater computer using the full verson Ubuntu 16.04LTS with mythtv, KODI and my HDHomerun tuner.

The LTS installed with no issues, but after installing mythtv and mysql I keep getting the 'unable to find database' error message in myth backend setup. I installed mythtv first using Ubuntu Applications. Since I could not find mysql listed there, I installed it using sudo apt-get install mysql.

I set up mysql with mythconverg, mythtv as user, mythtv as password as per the instructions I found here: https://help.ubuntu.com/community/My...roubleshooting. I have set up the database with a network address (192.168.1.201) instead of 'localhost'.

I have tried the steps over and over, re-booting along the way, to try to get myth backend to find the database, but it never does.

I am able to log into the database through terminal, so I know the database is there & functioning.

This is the error message I got when starting the mythfill database:

2017-09-20 17:11:22.419203 E [DBMANAGER0] Unable to connect to database!
2017-09-20 17:11:22.419203 E Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user ‘mythtv’@’192.168.1.201’ (using password: YES)

2017-09-20 17:11:22.419826 E [DBMANAGER0] Unable to connect to database!
2017-09-20 17:11:22.419826 E Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user ‘mythtv’@’192.168.1.201’ (using password: YES)

2017-09-20 17:11:22.420116 I Testing network connectivity to ‘192.168.1.210’
2017-09-20 17:11:22.420463 I Starting process manager
2017-09-20 17:11:22.421430 I Starting process signal handler
2017-09-20 17:11:22.421470 I Starting IO manager (read)
2017-09-20 17:11:22.421512 I Starting IO manager (write)
2017-09-20 17:11:22.472244 E [DBManager1] Unable to connect to database!
2017-09-20 17:11:22.472268 E Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user ‘mythtv’@’192.168.1.201’ (using password: YES)


Any assistance will be appreciated.

MikeB2013
Senior
Posts: 158
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: mythtv unable to access mysql in new 16.04 / mythtv inst

Post by MikeB2013 » Thu Sep 21, 2017 4:20 pm

As a guess, the password for user mythtv in one or more of your config.xml files does not match that in mysql.

A common cause of this is that the password in /etc/mythtv/config.xml on a new installation is not being used, or is different from that setup for mythtv user in mysql. mythtv-setup will use the one in /etc/mythtv/config.xml, it is usually sym linked to /home/mythtv/.mythtv/config.xml

try going into mysql as follows in a terminal session:

mysql -umythtv -p mythconverg

mysql will prompt for the password
use the one in /etc/mythtv/config.xml first, if that does not work try what you think you have setup, if neither works see https://www.mythtv.org/wiki/Build_from_ ... base_Setup the first part of section MythTV Database Setup to change the mythtv password in mysql

If one of the passwords works make sure the working password is in:
/home/mythtv/.mythtv/config.xml (usually sym linked to /etc/.mythtv/config.xml)
/home/<logged in user>/.mythtv/config.xml (you might have to create this just copy from /etc/mythtv/)


As an aside the default install of mythtv from Ubuntu 16.04 LTS repositories will give an old version of mythtv 0.28. This should be updated as follows in a terminal session.
sudo add-apt-repository ppa:mythbuntu/0.28
sudo apt-get update
sudo apt dist-upgrade

Note mythtv is now at version 29 (but updating to this version should wait until you have 0.28 working)
Just use the following to upgrade :
sudo add-apt-repository ppa:mythbuntu/0.29
sudo apt-get update
sudo apt dist-upgrade

Mike

darikehighbrow
Newcomer
Posts: 7
Joined: Thu Oct 02, 2014 3:12 pm
United States of America

Re: mythtv unable to access mysql in new 16.04 / mythtv inst

Post by darikehighbrow » Thu Sep 21, 2017 6:37 pm

Mike,

Thanks for the reply. I'll be trying your instructions when I get back home to my computer.

When I did my previous mythbuntu computer (14.04 with .27), I never had to adjust anything in mysql. I am a mysql noob, but have quite a bit of database experience with Access & an old dos database called Foxpro.

Thanks again for the assistance.

darikehighbrow
Newcomer
Posts: 7
Joined: Thu Oct 02, 2014 3:12 pm
United States of America

Re: mythtv unable to access mysql in new 16.04 / mythtv install

Post by darikehighbrow » Thu Oct 12, 2017 2:26 pm

I have tried to submit the message below for the past week, but keep getting this error message – “Your message contains too few characters.” Finally its going through.
MikeB2013 wrote:Postby MikeB2013 » Thu Sep 21, 2017 10:20 am

As a guess, the password for user mythtv in one or more of your config.xml files does not match that in mysql.

A common cause of this is that the password in /etc/mythtv/config.xml on a new installation is not being used, or is different from that setup for mythtv user in mysql. mythtv-setup will use the one in /etc/mythtv/config.xml, it is usually sym linked to /home/mythtv/.mythtv/config.xml
Thanks again for your help.

I tried your suggestions and actually got Mythtv backend to appear to connect to the database and to my HD Homerun and do the backend setup. But the frontend does not see the backend and is not able to do its setup.

I gave up on Mythtv for a while and installed my other apps including TVheadend. TVheadend worked 1st time with no problems. It records from my antenna and plays back with no problems. Everything I've installed works except Mythtv.

But, I have used Mythtv for years and much prefer it to TVheadend and really want to get Myth working.

Any other ideas? Are there logs that you need to see to assist me?

Thanks again for your assistance.

MikeB2013
Senior
Posts: 158
Joined: Mon Jul 25, 2016 4:16 pm
Great Britain

Re: mythtv unable to access mysql in new 16.04 / mythtv install

Post by MikeB2013 » Fri Oct 13, 2017 6:05 pm

You should find the mythfrontend log in /var/log/mythtv/ put the log on pastebin and post the link here.

Note that mythtv and TVheadend will compete for any tuners, all sorts of problems can result if both try to use the same tuner, so to use mythtv you must make sure TVheadend is not running and restart mythbackend (sudo systemctl restart mythtv-backend.service).

If you need to run/rerun mythtv-setup I suggest you use sudo systemctl stop mythtv-backend.service before entering mythtv-setup just to make sure mythbackend is not running - strange things happen if mythbackend and mythtv-setup are in use at the same time. When you have exited from mythtv-setup run sudo systemctl start mythtv-backend.service.


Edit: Forgot to mention
The easiest way to get a full mythtv installation (client/server) including database and other dependencies is to do
sudo apt update
sudo apt install mythtv

Mike

Post Reply