[mythtv-users] MySQL remote access not possible

Ramon Hofer ramonhofer at bluewin.ch
Sat May 28 09:27:45 UTC 2011


On 05/28/2011 10:30 AM, Ramon Hofer wrote:
> On 05/28/2011 02:01 AM, Nick Morrott wrote:
>> On 27 May 2011 22:59, Ramon Hofer<ramonhofer at bluewin.ch>   wrote:
>>> Hi all
>>>
>>> I'm trying to install MythTV Backend on Debian Squeeze.
>>> After installing the base system with SSH access I install mysql-server.
>>> There's no problem. I can reboot and there's no error message.
>>>
>>> But when I simply change the bind-address to the system's IP address and
>>> then reboot I get an error message when mysqld should be started.
>>>  From your syslog, it looks like networking is starting /after/ mysqld.
>> This is causing mysqld to fail to bind to the as-yet-unconfigured IP
>> address. When you restart mysqld, networking is up and mysqld can bind
>> successfully as the configured IP address has now been acquired.
> This explains a lot!
> What can I do against that problem?
>
>> The second issue (logging in to the database from the command line)
>> seems to be due to incomplete mysql access permissions - not user
>> permissions to the files on disk, but rather the user access control
>> to the database. Read through:
>>
>> http://www.mythtv.org/wiki/MythTV-HOWTO#Modifying_access_to_the_MySQL_database_for_multiple_systems
>>
>> and update your DB as necessary for your local network,
> Thanks for the link!
>

I restarted mysql and was able to connect with
$ mysql -u root -p

Then I created the db
$ mysql -u root -p < mc.sql


and granted access

$ mysql -u root mythconverg -p
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 104
Server version: 5.1.49-3 (Debian)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input 
statement.

mysql> grant all on mythconverg.* to mythtv@"192.168.1.%" identified by 
"mythtv";
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye



But this seems not to be working because I cant restore my old db (I 
replaced the mythtv db password with ******** at the bottom but on the 
top there was the password XXX. Maybe this is a problem?):

$ mythconverg_restore.pl --verbose --drop_database --create_database 
--filename mythconverg-1264-20110525205450-clean-install-before.sql.gz

Configuring environment:
   -    username: hoferr
   -        HOME: /home/hoferr
   - MYTHCONFDIR: /home/hoferr/.mythtv

Parsing configuration files:
   - checking: /home/hoferr/.mythtv/config.xml
      parsing: /home/hoferr/.mythtv/config.xml
   - checking: /home/hoferr/.mythtv/backuprc
      parsing: /home/hoferr/.mythtv/backuprc

Applying command-line arguments.

Checking configuration.

Database Information:
          DBHostName: 192.168.1.6
              DBPort: 0
          DBUserName: mythtv
          DBPassword: XXX
              DBName: mythconverg
         DBSchemaVer:
   DBBackupDirectory: /mnt/media-raid/db_backups
    DBBackupFilename: 
mythconverg-1264-20110525205450-clean-install-before.sql.gz
       drop_database: yes
     create_database: yes

Executables:
        mysql_client: mysql
          uncompress: gzip -d

Miscellaneous:
     partial_restore: no
    restore_xmltvids: no
     change_hostname: no

Checking database.

Preparing initial database.

Unable to connect to database.
            database: mythconverg
                host: 192.168.1.6
            username: mythtv
            password: ********

Please check your configuration files to verify the database connection
information is correct.  The files that are used to retrieve connection
information are prefixed with "parsing" in the "Parsing configuration files"
section of the --verbose output.

Also note that any [client] or [mysql] password specified in the MySQL 
options
file (/etc/my.cnf or /etc/mysql/my.cnf or ~/.my.cnf) will take 
precedence over
the password specified in the MythTV configuration files.

ERROR: Unable to connect to database.



What did I forget to do?
It's really strange because I already did this before and then it worked 
without any problems...


Cheers
Ramon


More information about the mythtv-users mailing list