[mythtv-users] 0.21-0.22 upgrade, can't make mysql/db connection
R. G. Newbury
newbury at mandamus.org
Sun Nov 22 04:36:33 UTC 2009
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 localhost IDENTIFIED BY "mythtv";
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv at localhost
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."
More information about the mythtv-users
mailing list