Re: [Hampshire] Remote access to mySQL

Top Page

Reply to this message
Author: James Courtier-Dutton
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Remote access to mySQL
Are you getting connection refused when you telnet to port 3306 ?


On 25 September 2015 at 10:50, Roger Munford
<rogermunford@???> wrote:
> Samuel,
>
> Thank you very much for this information. I followed it both with the
> troublesome connection and a well behaved connection and they both worked
> exactly as you described.
> this is great knowledge to have.
>
> Regards
>
> Roger
>
>
> On 24/09/15 21:44, Samuel Penn wrote:
>>
>> On Thursday 24 Sep 2015 12:58:32 Roger Munford wrote:
>>>
>>> I am having the perennial problem of connecting remotely to a MySQL
>>> database. I have no experience of administering MySQL myself and I am
>>> not confident that the person at the other end has had much either.
>>> I gave them my (fixed) ip address and received a user name and password
>>> back. I am using the MSQL workbench and have a couple of remote
>>> connections which work.
>>>
>>> Is there anything here that I may not know about or is there anything
>>> that I could suggest to my colleague.
>>
>> What happens if you telnet to port 3306 on the database machine, what
>> do you get? e.g. "telnet 20.30.40.50 3306"
>>
>> If you get a simple connection refused, then MySQL may not even be
>> listening (or it's being blocked by a firewall).
>>
>> I think MySQL is configured by default to not allow remote connections.
>> In the my.conf file (/etc/mysql/my.conf on Ubuntu) there is an option
>> for bind-address which defaults to 127.0.0.1
>>
>> This means that MySQL isn't even listening for remote connections,
>> so setting GRANT options for users and databases will have no effect.
>>
>> If they set this to 0.0.0.0 (listen on all networks), and restart MySQL,
>> then you may have more luck.
>>
>>
>> When MySQL is reachable, telnet should give you "Connected to ..." then
>> a load of garbage (you can't do anything useful over telnet, but it tells
>> you if MySQL is there or not).
>>
>>
>
>
> --
> Please post to: Hampshire@???
> Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG URL: http://www.hantslug.org.uk
> --------------------------------------------------------------


--
Please post to: Hampshire@???
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------