[mythtv-users] 0.28 upgrade issue frontend connection

Douglas Peale Douglas_Peale at comcast.net
Sun Jul 17 06:45:19 UTC 2016


On 07/16/2016 11:09 PM, Mark Perkins wrote:
>> The password was the first thing I fixed in the process of restoring the
>> database.
>>
> Yes, I saw that but mysql can have a different password per host and iirc from a quick read of the forums you used a host value of localhost. But, doesn't matter because next bit shows that your password is working.
>
>> $ mysql -umythtv -pb0RhwvPj -e "select * from mythconverg.settings where
>> value='BackendServerIP'"
>> mysql: [Warning] Using a password on the command line interface can be
>> insecure.
>> +-----------------+--------------+------------+
>> | value           | data         | hostname   |
>> +-----------------+--------------+------------+
>> | BackendServerIP | 192.168.63.3 | Compromise | BackendServerIP |
>> | 192.168.63.3 | Compromise |
>> +-----------------+--------------+------------+
>>
> This is good, means connected ok and shows that expecting backend on 192.168.63.3
>
>> $ netstat -peanut | grep 3306
>> (Not all processes could be identified, non-owned process info  will not be
>> shown, you would have to be root to see it all.)
>> tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      123        18287       -
>>
> Need to run netstat as root. I don’t know Mint but I assume something like:
>
> sudo netstat -peanut | grep 3306
>
> But at face value I think that mysql is binding to 127.0.0.1 ie localhost only. So remote connections won't work. If you only want to run a local mythfrontend you could try changing the ip address in your config.xml file to be 127.0.0.1 and restart backend and start frontend and see if that works. If you are looking to connect remote frontend(s) then see below.
>
>> $ cat /etc/mysql/my.cnf
>> #
>> # The MySQL database server configuration file.
>> #
>> # You can copy this to one of:
>> # - "/etc/mysql/my.cnf" to set global options, # - "~/.my.cnf" to set user-
>> specific options.
>> #
>> # One can use all long options that the program supports.
>> # Run program with --help to get a list of available options and with # --print-
>> defaults to see which it would actually understand and use.
>> #
>> # For explanations see
>> # http://dev.mysql.com/doc/mysql/en/server-system-variables.html
>>
>> #
>> # * IMPORTANT: Additional settings that can override those from this file!
>> #   The files must end with '.cnf', otherwise they'll be ignored.
>> #
>>
>> !includedir /etc/mysql/conf.d/
>> !includedir /etc/mysql/mysql.conf.d/
>>
>> $ cat /etc/mysql/mysql.conf.d/mythtv.cnf
>> [mysqld]
>> #bind-address=::
>> max_connections=100
>>
>>
>>
>> Should that bind-address be something other that "::"?
>>
> That bind-address is commented out so won't apply. But I note with interest it is an IPv6 format. I must admit I have disabled IPv6 on my boxes to dodge any potential complication that might cause. However shouldn’t necessarily be a problem.
>
> First lets see if there are any other cnf files for mysql. Execute the following two commands:
>
> ls /etc/mysql/conf.d/
> ls /etc/mysql/mysql.conf.d/
>
> If there are any other files in those two directories cat them and post so we can have a quick look. If /etc/mysql/mysql.conf.d/mythtv.cnf is the only file then uncomment the bind-address line by deleting the # at the front and change the :: address to be 0.0.0.0 (binds to everything, can tighten it up later once things are working).
>
> Restart mysql. I have no idea if Mint runs systemd or not, try as root user:
> systemctl restart mysqld
>
> Or else try:
> service mysqld restart
>
> Or worst case just reboot.
>
> Then re-run:
> sudo netstat -peanut | grep 3306
>
> And we can compare to previous run.
>
> Check if this works:
> mysql -umythtv -pb0RhwvPj -e "select * from mythconverg.settings where value='BackendServerIP'"
>
> If it still does try this:
> mysql -h192.168.63.3 -umythtv -pb0RhwvPj -e "select * from mythconverg.settings where value='BackendServerIP'"
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

$ sudo netstat -peanut | grep 3306
[sudo] password for dpeale:
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      123        18287       1429/mysqld    

This is a single computer mythTV setup, so external access is not expected.

The IP address of this computer is 192.168.63.3  so for this machine, it should work the same as 127.0.0.1 or localhost.

$ ls /etc/mysql/conf.d
mysql.cnf  mysqldump.cnf  mythtv.cnf

$ ls /etc/mysql/mysql.conf.d/
mysqld.cnf  mysqld_safe_syslog.cnf  mythtv.cnf

$ cat /etc/mysql/conf.d/mysql.cnf
[mysql]

$ cat /etc/mysql/conf.d/mysqldump.cnf
[mysqldump]
quick
quote-names
max_allowed_packet    = 16M

$ cat /etc/mysql/conf.d/mythtv.cnf
[mysqld]
#bind-address=::
max_connections=100

$ cat /etc/mysql/mysql.conf.d/mysqld.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.

# Here is entries for some specific programs
# The following values assume you have at least 32M ram

[mysqld_safe]
socket        = /var/run/mysqld/mysqld.sock
nice        = 0

[mysqld]
#
# * Basic Settings
#
user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket        = /var/run/mysqld/mysqld.sock
port        = 3306
basedir        = /usr
datadir        = /var/lib/mysql
tmpdir        = /tmp
lc-messages-dir    = /usr/share/mysql
skip-external-locking
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address        = 127.0.0.1
#
# * Fine Tuning
#
key_buffer_size        = 16M
max_allowed_packet    = 16M
thread_stack        = 192K
thread_cache_size       = 8
# This replaces the startup script and checks MyISAM tables if needed
# the first time they are touched
myisam-recover-options  = BACKUP
#max_connections        = 100
#table_cache            = 64
#thread_concurrency     = 10
#
# * Query Cache Configuration
#
query_cache_limit    = 1M
query_cache_size        = 16M
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error log - should be very few entries.
#
log_error = /var/log/mysql/error.log
#
# Here you can see queries with especially long duration
#log_slow_queries    = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes
#
# The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication slave, see README.Debian about
#       other settings you may need to change.
#server-id        = 1
#log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size   = 100M
#binlog_do_db        = include_database_name
#binlog_ignore_db    = include_database_name
#
# * InnoDB
#
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
#
# * Security Features
#
# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/
#
# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".
#
# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem

$ cat /etc/mysql/mysql.conf.d/mysqld_safe_syslog.cnf
[mysqld_safe]
syslog

The mythv.cnf in mysql.conf.d is a link to the one in conf.d

Edited mythtv.cnf and rebooted.

$ sudo netstat -peanut | grep 3306
[sudo] password for dpeale:
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      123        23660       1479/mysqld    

$ mysql -umythtv -pb0RhwvPj -e "select * from mythconverg.settings where value='BackendServerIP'"
mysql: [Warning] Using a password on the command line interface can be insecure.
+-----------------+--------------+------------+
| value           | data         | hostname   |
+-----------------+--------------+------------+
| BackendServerIP | 192.168.63.3 | Compromise |
| BackendServerIP | 192.168.63.3 | Compromise |
+-----------------+--------------+------------+

$ mysql -h192.168.63.3 -umythtv -pb0RhwvPj -e "select * from mythconverg.settings where value='BackendServerIP'"
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'mythtv'@'192.168.63.3' (using password: YES)


I need to get some sleep. I'll resume this in the morning.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160716/723d9bef/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20160716/723d9bef/attachment.sig>


More information about the mythtv-users mailing list