[mythtv-users] mysql problems

Damian myth at surr.co.uk
Wed Apr 27 11:48:33 UTC 2016


On 26/04/2016 22:05, Hika van den Hoven wrote:
> Hoi Damian,
>
> Tuesday, April 26, 2016, 10:50:56 PM, you wrote:
>
>> Hi Everyone,
>
>> I've got the shiny new Xubuntu 16.04 freshly installed on all of my
>> machines. I'm just starting to add Mythbuntu backend onto the server
>> machine tonight, and I'm having problems already.
>
>> The backend can't connect to mysql.
>
>> I can log in as root ...
>> mysql -u root -p
>> ... gets me in fine.
>
>> I can log in as mythtv ...
>> mysql -u mythtv -p
>> ... gets me in fine.
>
>> However, this ...
>> mysql -u mythtv -p -h 192.168.0.2
>> ... responds with:
>> ERROR 2003 (HY000): Can't connect to MySQL server on '192.168.0.2' (111)
>
>> I don't understand this. Why can I not log in when I specify the
>> computer's own IP address?
>
>> ifconfig confirms that "inet addr:192.168.0.2"
>
>> I just checked, and I can log in with " mysql -u mythtv -p -h
>> 127.0.0.1". It's just adding the real IP address that's not working.
>
>> I assume this is the source of the problem. Any idea what's causing this?
>
>> Thanks,
>> Damian
>> _______________________________________________
>
> Two possible reasons:
> 1: You did not edit your my.conf to listen outside the machine
>    e.g. Changing bind-address from 127.0.0.1 to either 0.0.0.0 or the
>    actual address
> 2: You did not add a password for those locations. A login name in
>    mysql consists of the name and the machine. So for root you have
>    have one for 127.0.0.1, localhost, the actual hostname, %, or any
>    ip-address, hostname or subnet.
>

Thanks Hika,

Peter's suggestion of editing "/etc/mysql/mysql.conf.d/mysqld.cnf" and 
commenting out "bind-address = 127.0.0.1" sorted it.

Regards,
Damian


More information about the mythtv-users mailing list