[asterisk-users] Ubuntu as remote MySQL server

Atis Lezdins atis at iq-labs.net
Mon May 26 04:41:53 CDT 2008


On Mon, May 26, 2008 at 11:38 AM, Ronald Wiplinger <ronald at elmit.com> wrote:
> mkn0014 wrote:
>> Ronald Wiplinger wrote:
>>
>>> Tilghman Lesher wrote:
>>>
>>>
>>>> On Monday 26 May 2008 01:32:31 Ronald Wiplinger wrote:
>>>>
>>>>
>>>>
>>>>> Tilghman Lesher wrote:
>>>>>
>>>>>
>>>>>
>>>>>> On Monday 26 May 2008 00:46:16 Ronald Wiplinger wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Tilghman Lesher wrote:
>>>>>>>
>>>>>>> I added the Grant statement
>>>>>>>
>>>>>>> GRANT select,insert,update ON asterisk.* to astuser at 192.168.1.20
>>>>>>> IDENTIFIED BY 'somepassword';
>>>>>>>
>>>>>>>
>>>>>>> reloaded the privileges, and still get the same problem:
>>>>>>> [May 26 13:40:48] ERROR[3109]: res_config_mysql.c:651 mysql_reconnect:
>>>>>>> MySQL RealTime: Failed to connect database server astconf on
>>>>>>> 192.168.250.254 (err 2003). Check debug for more info.
>>>>>>>
>>>>>>>
>>>>>>> # mysql -uastuser -h192.168.250.20 -p
>>>>>>> Enter password:
>>>>>>> ERROR 1045: Access denied for user: 'astuser at vpbx.elmit.com' (Using
>>>>>>> password: YES)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> Okay, you're failing to connect to 192.168.250.254 in the Asterisk
>>>>>> config, yet you're connecting to 192.168.250.20 in the test.  So check
>>>>>> your IP addresses carefully, to ensure that you're trying to connect to
>>>>>> the correct server.
>>>>>>
>>>>>>
>>>>>>
>>>>> Sorry, I miss spelled it. It gives me another error:
>>>>>  # mysql -uastuser -h192.168.250.254 -p
>>>>> Enter password:
>>>>> ERROR 2003: Can't connect to MySQL server on '192.168.250.254' (111)
>>>>>
>>>>> Remains the same problem, I cannot connect.
>>>>> How can I further test why it does not connect?
>>>>>
>>>>>
>>>>>
>>>> Okay, progress.  You probably don't have MySQL configured to listen on its
>>>> TCP port (this is disabled by default).  Check for the line 'skip-networking'
>>>> in /etc/mysql/my.cnf or bind-address=127.0.0.1.  Either setting will prevent
>>>> MySQL from listening on the public addresses.
>>>>
>>>>
>>>>
>>>>
>>> Not so good!
>>>
>>> I changed bind-address = 192.168.250.254 (that is the ethernet port on
>>> the internal lan of the server)
>>> The result is:
>>> 1. the local website on that server cannot access the local database for
>>> the web portal
>>> 2. the remote asterisk gets the error:
>>> ERROR 1251: Client does not support authentication protocol requested by
>>> server; consider upgrading MySQL client
>>>
>>> I tried to add in the mysqld section of my.ini
>>> old_passwords
>>>
>>> but it did not help to overcome.
>>>
>>> Besides to upgrade the asterisk machine is there anything I can do now?
>>> I plan to upgrade the Asterisk server including Asterisk in the next weeks.
>>>
>>>
>>> bye
>>>
>>> Ronald
>>>
>>>
>>
>> Try this thread.
>>
>> http://lists.mysql.com/mysql/183474
>>
>
> Thanks that helped for Astrisk. Basically I just had to change in the
> user table of MySQL the field of password to "OLD_PASSWORD" so it makes
> a 16 Byte hash instead of new 41 Bytes.
>
> Now I got an additional problem.
> I changed in the my.ini   bind=192.168.250.254
> That gives me the problem that a local web page cannot access the
> database. Can I somehow use two bind? 127.0.0.1 and 192.168.250.254???
> Actually I do not understand, because when I am on the server executing
> the mysql for the local mysql with -h192.168.250.254 it works, just not
> via the web site.
>
>

127.0.0.1 is on different network interface, so that it's only
accessible from local machine.

this should work (binds all interfaces):
bind = 0.0.0.0

Regards,
Atis

-- 
Atis Lezdins,
VoIP Project Manager / Developer,
atis at iq-labs.net
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835



More information about the asterisk-users mailing list