[mythtv-users] QMYSQL3: Can't connect to MySQL server during backend setup.

Friedrich Clausen fred at derf.nl
Fri Sep 26 09:35:59 UTC 2008


Hello,

On Wed, Sep 24, 2008 at 10:34 PM, Bains, Gurvinder
<gurvinder.bains at christushealth.org> wrote:
> Hi,
>
> I get the following error while doing a fresh install and setup of backend
> and frontend on the same PC:
>
> QMYSQL3: Unable to connect
> QMYSQL3: Can't connect to MySQL server on 'bains-homepc' (111)
>
> I also changed the DBHostName=localhost to the name of the local PC but came
> across the same issue.
>
> I checked permissions on mythconverg database for user 'mythtv' to
> ensure I could not login and query the database to rule out access issues.
>
> During one purge and reinstall cycle I got access denied for mythtv user
> so I granted permissions using the command below:
>
> mysql> grant all on mythconverg.* to mythtv@"192.168.1.%" identified by
> "mythtv";
> mysql> flush privileges;
> Query OK, 0 rows affected (0.00 sec)

Error code 111 means it might night be listening on a tcp socket. Make
sure that "skip-networking" is not present in /etc/my.cnf under the
"[mysqld]" section.

Otherwise I believe the problem may be that you are allowing the user
mythtv to connect via the main interface (ethX, eg. 192.168.1.Y) but
in myth setup you are trying to connect to localhost. To MySQL these
are different and you need to define a connection method for each. Try
(in addition to above):

mysql> grant all on mythconverg.* to mythtv at localhost identified by 'mythtv';
mysq> flush privileges;

Good luck!

Fred.

>
> ** Attachment added: "Screenshots and log of installation."
>   http://launchpadlibrarian.net/17663277/mythtv_dberr3.zip
>
>
> I also posted this to bug 243504
>
> --
> mythtv-setup: unable to connect to database
> https://bugs.launchpad.net/bugs/243504
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in "mythtv" source package in Ubuntu: New
>
> Bug description:
> Binary package hint: mythtv-backend
>
> $ dpkg -l mythtv-backend
> ii  mythtv-backend      0.21.0+fixes16838-0 A personal video recorder
> application (server)
>
> $ lsb_release -rd
> Description:    Ubuntu 8.04
> Release:        8.04
>
> what happens - I cannot complete the configuration of mythtv with
> mythtv-setup. This appears to be because the mysql database is not fully
> populated.
>
> what should happen - I should be able to set up mythtv.
>
> Background information
> $ id
> uid=1000(vjm) gid=1000(vjm)
> groups=4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),107(fuse),110(lpadmin),120(admin),125(mysql),126(mythtv),1000(vjm)
>
> $ sudo /etc/init.d/mysql status
>  * /usr/bin/mysqladmin  Ver 8.41 Distrib 5.0.51a, for debian-linux-gnu on
> i486
> Copyright (C) 2000-2006 MySQL AB
> This software comes with ABSOLUTELY NO WARRANTY. This is free software,
> and you are welcome to modify and redistribute it under the GPL license
>
> Server version          5.0.51a-3ubuntu5.1
> Protocol version        10
> Connection              Localhost via UNIX socket
> UNIX socket             /var/run/mysqld/mysqld.sock
> Uptime:                 1 hour 25 min 56 sec
>
> Threads: 1  Questions: 43  Slow queries: 0  Opens: 23  Flush tables: 1  Open
> tables: 17  Queries per second avg: 0.008
>
> $ ps -fade|grep myth
> mythtv    8983     1  0 22:22 ?        00:00:06 /usr/bin/mythbackend
> --daemon --logfile /var/log/mythtv/mythbackend.log --pidfile
> /var/run/mythtv/mythbackend.pid
> vjm       9178  6809  0 22:34 pts/0    00:00:00 grep myth
>
> What I tried to do:
>
> $ mythtv-setup
> (I get a popup asking to close any running mythbackends. I say OK)
>
> (I get a small xterm with error messages in it, saying unable to connect to
> database.
> Could not capture this for you, because a fullscreen display suddenly
> appears)
> The fullscreen display prompts for things like database name, user ,
> password.
> I left these as defaults, and hit <return> immediately.
> (Oh, and it shows "No UPnP devices available", to which I say "OK" since
> there is nothing else to say.
>
> On the original terminal I get:
>  * Stopping MythTV server: mythbackend                                   [
> OK ]
>  * Restarting MythTV server: mythbackend
>    No /usr/bin/mythbackend found running; none killed.
>                                                                         [ OK
> ]
>
> (I get another popup, would you like to run mythfilldatabase?) <cancel>
>
> yet, I am able to connect to mysql as mythv at localhost, with no password.
> $ mysql -u mythtv at localhost
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 87923
> Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql>  show databases;
> +--------------------+
> | Database           |
> +--------------------+
> | information_schema |
> +--------------------+
> 1 row in set (0.00 sec)
> mysql> use mythconverg;
> ERROR 1044 (42000): Access denied for user ''@'localhost' to database
> 'mythconverg'
> mysql> quit
> Bye
>
> I checked for .my.cnf files and so forth, could find none in my home dir nor
> in /home/mythtv.
> The closest thing was the .mythtv/mysql.txt file;
>
> $ grep -v ^# /home/mythtv/.mythtv/mysql.txt
> DBHostName=localhost
>
> DBHostPing=no
>
> DBUserName=mythtv
> DBName=mythconverg
> DBType=
>
>
> DBPassword=***********
>
> $ sudo dpkg-reconfigure mythtv
> < does nothing.>
>
> $ sudo dpkg-reconfigure mythtv-backend
> <answer NO to create v4l device nodes>
> Then it asks me to run mythtv-setup. oh. Well that's going to be a problem.
> Then I have to start mythtv-backend again.
>
> Try that anyway:
> $ /etc/init.d/mythtv-backend stop
> $ /etc/init.d/mythtv-backend start
> (no errors, let's stop again)
> $ /etc/init.d/mythtv-backend stop
> $ mythtv-setup
> does not seem to help.
>
> Any help would be appreciated.
>
> --
> Regards,
> Gurvinder Singh
>
> "God's gifts put man's best dreams to shame." - Elizabeth Barrett Browning
>
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>


More information about the mythtv-users mailing list