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

Mailing List Archive: MythTV: Users

0.21-0.22 upgrade, can't make mysql/db connection

 

 

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


bobbygill at rogers

Nov 21, 2009, 3:51 PM

Post #1 of 4 (395 views)
Permalink
0.21-0.22 upgrade, can't make mysql/db connection

Just did ye ol' upgrade:

> sudo tail -f mythbox.err
091121 18:29:38 [Note] /usr/sbin/mysqld: Shutdown complete

091121 18:29:38 mysqld_safe mysqld from pid file /var/lib/mysql/mythbox.pid
ended
091121 18:30:51 mysqld_safe Starting mysqld daemon with databases from
/var/lib/mysql
091121 18:30:53 [Note] Plugin 'FEDERATED' is disabled.
091121 18:30:53 [Note] Plugin 'ndbcluster' is disabled.
091121 18:30:54 InnoDB: Started; log sequence number 0 193508
091121 18:30:55 [Note] Event Scheduler: Loaded 0 events
091121 18:30:55 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.41' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Source
distribution

No errors from mysql after some db checking and upgrading (and was all OKs
from that).

2009-11-21 18:39:52.271 Testing network connectivity to '192.168.1.100'
2009-11-21 18:39:52.278 Closing DB connection named 'DBManager0'
2009-11-21 18:39:52.279 Unable to connect to database!
2009-11-21 18:39:52.279 Driver error was [1/2003]:
QMYSQL: Unable to connect
Database error was:
Can't connect to MySQL server on '192.168.1.100' (111)

2009-11-21 18:39:52.279 Cannot login to database?


I keep getting this, and mythbackend.log shows nothing helpful, just proper
log entries/no errors or anything. My /etc/mysql/my.cnf is here if of any
use: http://pastebin.ca/1681585

I do have some other web apps using mysql that are functioning properly, so
I'm pretty sure it's not mysql (?).

Thanks for any help,
Bob


andy at squeakycode

Nov 21, 2009, 5:41 PM

Post #2 of 4 (371 views)
Permalink
Re: 0.21-0.22 upgrade, can't make mysql/db connection [In reply to]

Bobby Gill wrote:

> Database error was:
> Can't connect to MySQL server on '192.168.1.100' (111)
>
> 2009-11-21 18:39:52.279 Cannot login to database?
>
>
>
> Thanks for any help,
> Bob
>


192.168.1.100

Did the computers ip change? You could use 127.0.0.1 to refer to localhost instead.

-Andy
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


brownitus at gmail

Nov 21, 2009, 6:50 PM

Post #3 of 4 (357 views)
Permalink
Re: 0.21-0.22 upgrade, can't make mysql/db connection [In reply to]

> 192.168.1.100
>
> Did the computers ip change? You could use 127.0.0.1 to refer to localhost
> instead.
>

Nope, nothing changed there.. and my FE/BE are separate boxes. FE = .101, BE
= .100, been like this forever and every Myth upgrade has been swell, pretty
perplexed here..

Thanks
Bob


newbury at mandamus

Nov 21, 2009, 8:36 PM

Post #4 of 4 (354 views)
Permalink
Re: 0.21-0.22 upgrade, can't make mysql/db connection [In reply to]

Bobby Gill wrote:
>
> 192.168.1.100
>
> Did the computers ip change? You could use 127.0.0.1 to refer to
> localhost instead.
>
>
> Nope, nothing changed there.. and my FE/BE are separate boxes. FE =
> .101, BE = .100, been like this forever and every Myth upgrade has been
> swell, pretty perplexed here..
>
Sounds like the frontend user (normally 'mythtv') does not have access
rights.
A backend often runs as a mysql 'root' user...and mysql usually installs
with NO PASSWORD on a root user. So the backend can work and the front
will fail.

So, first, can you get to the mysql console ( a 'mysql>' prompt) on the
backend machine as root?

I presume that the Backend also hosts the mysql database, otherwise you
need to be on that machine.

$ mysql -u root -p <Enter>
Enter Password: (Hit Enter or enter the password).
mysql> use mysql; # This is the mysql admin database
Database changed
mysql> select host,user,password from user; # The 'user' table has
field 'user'...clear as mud, right?
This will print out the allowed users, their hosts and a hash
representing their password. something like:

mysql> select host,user,password from user;
+-------------------+--------+------------------+
| host | user | password |
+-------------------+--------+------------------+
| localhost | root | 1b3ab4920bfa6d2a |
| tor1.mandamus.org | root | 1b3ab4920bfa6d2a |
| 127.0.0.1 | root | 1b3ab4920bfa6d2a |
| localhost | mythtv | 0476fc026afffe24 |
| tor1.mandamus.org | mythtv | 0476fc026afffe24 |
+-------------------+--------+------------------+

In your case you need the mythtv user to be from a different host.
This is the mc.sql script, which probably exists on your install, but
may not...You need to adjust it as necessary. Replace 'localhost' with
your ...101 or the hostname (presumes that the machine is listed in
/etc/hosts).

CREATE DATABASE IF NOT EXISTS mythconverg;
GRANT ALL ON mythconverg.* TO mythtv [at] localhos IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv [at] localhos
IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE
utf8_general_ci;

Run this, on the backend machine by:
$ mysql -u root -ppassword < mc.sql

You should also add a password for the mysql root user if one does not
exist:
mysql> use mysql;
mysql> update user set Password=PASSWORD("yourpasswordhere") where
user='root';

Geoff





--
Please let me know if anything I say offends you.
I may wish to offend you again in the future.

Tux says: "Be regular. Eat cron flakes."
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/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.