Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Ubuntu as remote MySQL server


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
ronald at elmit.com
Guest





PostPosted: Sun May 25, 2008 10:59 pm    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

I have replaced a SuSE server with an Ubuntu 8.04 server.

The server runs MySQL, which is working locally. My Asterisk server
(192.168.1.20) should access this MySQL server (192.168.1.254). I have
left on the Asterisk server my old settings:
[general]
dbhost = 192.168.1.254
dbname = myasterisk
dbuser = myastuser
dbpass = myastpass
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock

In MySQL I have setup a record with

INSERT INTO `user` (`Host`, `User`, `Password`, `Select_priv`,
`Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`,
`Reload_priv`, `Shutdown_priv`, `Process_priv`, `File_priv`,
`Grant_priv`, `References_priv`, `Index_priv`, `Alter_priv`,
`Show_db_priv`, `Super_priv`, `Create_tmp_table_priv`,
`Lock_tables_priv`, `Execute_priv`, `Repl_slave_priv`,
`Repl_client_priv`, `Create_view_priv`, `Show_view_priv`,
`Create_routine_priv`, `Alter_routine_priv`, `Create_user_priv`,
`ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject`,
`max_questions`, `max_updates`, `max_connections`,
`max_user_connections`) VALUES
('192.168.1.20', 'root', '**********************', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', 0, 0, 0, 0);

However, the remote client (*.20) cannot connect to the server (*.254):
[May 26 11:50:21] ERROR[3096]: res_config_mysql.c:651 mysql_reconnect:
MySQL RealTime: Failed to connect database server myasterisk on
192.168.1.254 (err 2003). Check debug for more info.

What do I miss?

bye

Ronald
Back to top
tzafrir.cohen at xorco...
Guest





PostPosted: Sun May 25, 2008 11:16 pm    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

On Mon, May 26, 2008 at 11:59:11AM +0800, Ronald Wiplinger wrote:
Quote:
I have replaced a SuSE server with an Ubuntu 8.04 server.

The server runs MySQL, which is working locally. My Asterisk server
(192.168.1.20) should access this MySQL server (192.168.1.254). I have
left on the Asterisk server my old settings:
[general]
dbhost = 192.168.1.254
dbname = myasterisk
dbuser = myastuser
dbpass = myastpass
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock

In MySQL I have setup a record with

INSERT INTO `user` (`Host`, `User`, `Password`, `Select_priv`,
`Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`,
`Reload_priv`, `Shutdown_priv`, `Process_priv`, `File_priv`,
`Grant_priv`, `References_priv`, `Index_priv`, `Alter_priv`,
`Show_db_priv`, `Super_priv`, `Create_tmp_table_priv`,
`Lock_tables_priv`, `Execute_priv`, `Repl_slave_priv`,
`Repl_client_priv`, `Create_view_priv`, `Show_view_priv`,
`Create_routine_priv`, `Alter_routine_priv`, `Create_user_priv`,
`ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject`,
`max_questions`, `max_updates`, `max_connections`,
`max_user_connections`) VALUES
('192.168.1.20', 'root', '**********************', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', 0, 0, 0, 0);

And the reason you need to use such a priviliged user is?

Use mysqladmin or whatever to administrate the database. The Asterisk
mysql user does *not* need to have full control. If someone manages to
find a clever way to inject SQL commands through your CDR data, thoey
should not be able to toast your whole database at that opportunity.

Quote:

However, the remote client (*.20) cannot connect to the server (*.254):
[May 26 11:50:21] ERROR[3096]: res_config_mysql.c:651 mysql_reconnect:
MySQL RealTime: Failed to connect database server myasterisk on
192.168.1.254 (err 2003). Check debug for more info.

What do I miss?

--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Back to top
ronald at elmit.com
Guest





PostPosted: Sun May 25, 2008 11:31 pm    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

Tzafrir Cohen wrote:
Quote:
On Mon, May 26, 2008 at 11:59:11AM +0800, Ronald Wiplinger wrote:

Quote:
I have replaced a SuSE server with an Ubuntu 8.04 server.

The server runs MySQL, which is working locally. My Asterisk server
(192.168.1.20) should access this MySQL server (192.168.1.254). I have
left on the Asterisk server my old settings:
[general]
dbhost = 192.168.1.254
dbname = myasterisk
dbuser = myastuser
dbpass = myastpass
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock

In MySQL I have setup a record with

INSERT INTO `user` (`Host`, `User`, `Password`, `Select_priv`,
`Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`,
`Reload_priv`, `Shutdown_priv`, `Process_priv`, `File_priv`,
`Grant_priv`, `References_priv`, `Index_priv`, `Alter_priv`,
`Show_db_priv`, `Super_priv`, `Create_tmp_table_priv`,
`Lock_tables_priv`, `Execute_priv`, `Repl_slave_priv`,
`Repl_client_priv`, `Create_view_priv`, `Show_view_priv`,
`Create_routine_priv`, `Alter_routine_priv`, `Create_user_priv`,
`ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject`,
`max_questions`, `max_updates`, `max_connections`,
`max_user_connections`) VALUES
('192.168.1.20', 'root', '**********************', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', 0, 0, 0, 0);


And the reason you need to use such a priviliged user is?

Use mysqladmin or whatever to administrate the database. The Asterisk
mysql user does *not* need to have full control. If someone manages to
find a clever way to inject SQL commands through your CDR data, thoey
should not be able to toast your whole database at that opportunity.


Do you mean that too many privileges prevent to connect to the database?

bye

Ronald

Quote:

Quote:
However, the remote client (*.20) cannot connect to the server (*.254):
[May 26 11:50:21] ERROR[3096]: res_config_mysql.c:651 mysql_reconnect:
MySQL RealTime: Failed to connect database server myasterisk on
192.168.1.254 (err 2003). Check debug for more info.

What do I miss?



--
Ronald Wiplinger (CEO of ELMIT)
http://www.elmit.com +886 (0) 939--77-55-16 or FWD 511208
- I'm a SpamCon Foundation Member, #694, Verify it at http://www.spamcon.org

PS: Spam prevention!
Our system is protected with a spam prevention program.
If you send us an e-mail, our system will send you a confirmation message back. Just reply to this confirmation message please.
After receiving this confirmation message, our system will send the hold message (one) and all future messages (after the received confirmation message) to me without asking you again.
Back to top
tilghman at mail.jeffa...
Guest





PostPosted: Mon May 26, 2008 12:12 am    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

On Sunday 25 May 2008 23:31:27 Ronald Wiplinger wrote:
Quote:
Tzafrir Cohen wrote:
Quote:
On Mon, May 26, 2008 at 11:59:11AM +0800, Ronald Wiplinger wrote:
Quote:
I have replaced a SuSE server with an Ubuntu 8.04 server.

The server runs MySQL, which is working locally. My Asterisk server
(192.168.1.20) should access this MySQL server (192.168.1.254). I have
left on the Asterisk server my old settings:
[general]
dbhost = 192.168.1.254
dbname = myasterisk
dbuser = myastuser
dbpass = myastpass
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock

In MySQL I have setup a record with

INSERT INTO `user` (`Host`, `User`, `Password`, `Select_priv`,
`Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`,
`Reload_priv`, `Shutdown_priv`, `Process_priv`, `File_priv`,
`Grant_priv`, `References_priv`, `Index_priv`, `Alter_priv`,
`Show_db_priv`, `Super_priv`, `Create_tmp_table_priv`,
`Lock_tables_priv`, `Execute_priv`, `Repl_slave_priv`,
`Repl_client_priv`, `Create_view_priv`, `Show_view_priv`,
`Create_routine_priv`, `Alter_routine_priv`, `Create_user_priv`,
`ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject`,
`max_questions`, `max_updates`, `max_connections`,
`max_user_connections`) VALUES
('192.168.1.20', 'root', '**********************', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', 0, 0, 0, 0);

And the reason you need to use such a priviliged user is?

Use mysqladmin or whatever to administrate the database. The Asterisk
mysql user does *not* need to have full control. If someone manages to
find a clever way to inject SQL commands through your CDR data, thoey
should not be able to toast your whole database at that opportunity.

Do you mean that too many privileges prevent to connect to the database?

This is actually a MySQL question. Generally, although the user table does
control who can connect, it is advisable to use the GRANT command to set up
permissions, e.g.

GRANT select,insert,update ON asterisk.* to astuser at 192.168.1.20 IDENTIFIED BY
'somepassword';

There are various issues with just inserting a record, the main one of which
is that the permissions are cached in memory, so if you do update the table,
you need to "FLUSH TABLES;" before those changes will take effect. Also, the
hash used for the password function differs in various versions. A mismatch
will cause the database user to be unable to login. And finally, if there are
existing permissions, you may get more or less than you bargained for, by
inserting records on your own. Using the GRANT/REVOKE facility will ensure
that the resulting permissions exactly match what you specified in that
command, no more and no less.

--
Tilghman
Back to top
ronald at elmit.com
Guest





PostPosted: Mon May 26, 2008 12:46 am    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

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)


I cannot see, what I am doing wrong.
Any help is appreciate!

bye

Ronald


Quote:
On Sunday 25 May 2008 23:31:27 Ronald Wiplinger wrote:

Quote:
Tzafrir Cohen wrote:

Quote:
On Mon, May 26, 2008 at 11:59:11AM +0800, Ronald Wiplinger wrote:

Quote:
I have replaced a SuSE server with an Ubuntu 8.04 server.

The server runs MySQL, which is working locally. My Asterisk server
(192.168.1.20) should access this MySQL server (192.168.1.254). I have
left on the Asterisk server my old settings:
[general]
dbhost = 192.168.1.254
dbname = myasterisk
dbuser = myastuser
dbpass = myastpass
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock

In MySQL I have setup a record with

INSERT INTO `user` (`Host`, `User`, `Password`, `Select_priv`,
`Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`,
`Reload_priv`, `Shutdown_priv`, `Process_priv`, `File_priv`,
`Grant_priv`, `References_priv`, `Index_priv`, `Alter_priv`,
`Show_db_priv`, `Super_priv`, `Create_tmp_table_priv`,
`Lock_tables_priv`, `Execute_priv`, `Repl_slave_priv`,
`Repl_client_priv`, `Create_view_priv`, `Show_view_priv`,
`Create_routine_priv`, `Alter_routine_priv`, `Create_user_priv`,
`ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject`,
`max_questions`, `max_updates`, `max_connections`,
`max_user_connections`) VALUES
('192.168.1.20', 'root', '**********************', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y',
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', 0, 0, 0, 0);

And the reason you need to use such a priviliged user is?

Use mysqladmin or whatever to administrate the database. The Asterisk
mysql user does *not* need to have full control. If someone manages to
find a clever way to inject SQL commands through your CDR data, thoey
should not be able to toast your whole database at that opportunity.

Do you mean that too many privileges prevent to connect to the database?


This is actually a MySQL question. Generally, although the user table does
control who can connect, it is advisable to use the GRANT command to set up
permissions, e.g.

GRANT select,insert,update ON asterisk.* to astuser at 192.168.1.20 IDENTIFIED BY
'somepassword';

There are various issues with just inserting a record, the main one of which
is that the permissions are cached in memory, so if you do update the table,
you need to "FLUSH TABLES;" before those changes will take effect. Also, the
hash used for the password function differs in various versions. A mismatch
will cause the database user to be unable to login. And finally, if there are
existing permissions, you may get more or less than you bargained for, by
inserting records on your own. Using the GRANT/REVOKE facility will ensure
that the resulting permissions exactly match what you specified in that
command, no more and no less.




--
Ronald Wiplinger (CEO of ELMIT)
http://www.elmit.com +886 (0) 939--77-55-16 or FWD 511208
- I'm a SpamCon Foundation Member, #694, Verify it at http://www.spamcon.org

PS: Spam prevention!
Our system is protected with a spam prevention program.
If you send us an e-mail, our system will send you a confirmation message back. Just reply to this confirmation message please.
After receiving this confirmation message, our system will send the hold message (one) and all future messages (after the received confirmation message) to me without asking you again.
Back to top
tilghman at mail.jeffa...
Guest





PostPosted: Mon May 26, 2008 1:13 am    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

On Monday 26 May 2008 00:46:16 Ronald Wiplinger wrote:
Quote:
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.

--
Tilghman
Back to top
ronald at elmit.com
Guest





PostPosted: Mon May 26, 2008 1:32 am    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

Tilghman Lesher wrote:
Quote:
On Monday 26 May 2008 00:46:16 Ronald Wiplinger wrote:

Quote:
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?
Back to top
tilghman at mail.jeffa...
Guest





PostPosted: Mon May 26, 2008 1:47 am    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

On Monday 26 May 2008 01:32:31 Ronald Wiplinger wrote:
Quote:
Tilghman Lesher wrote:
Quote:
On Monday 26 May 2008 00:46:16 Ronald Wiplinger wrote:
Quote:
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.

--
Tilghman
Back to top
ronald at elmit.com
Guest





PostPosted: Mon May 26, 2008 2:23 am    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

Tilghman Lesher wrote:
Quote:
On Monday 26 May 2008 01:32:31 Ronald Wiplinger wrote:

Quote:
Tilghman Lesher wrote:

Quote:
On Monday 26 May 2008 00:46:16 Ronald Wiplinger wrote:

Quote:
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
Back to top
mkn0014 at gmail.com
Guest





PostPosted: Mon May 26, 2008 3:06 am    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

Ronald Wiplinger wrote:
Quote:
Tilghman Lesher wrote:

Quote:
On Monday 26 May 2008 01:32:31 Ronald Wiplinger wrote:


Quote:
Tilghman Lesher wrote:


Quote:
On Monday 26 May 2008 00:46:16 Ronald Wiplinger wrote:


Quote:
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
Back to top
ronald at elmit.com
Guest





PostPosted: Mon May 26, 2008 3:38 am    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

mkn0014 wrote:
Quote:
Ronald Wiplinger wrote:

Quote:
Tilghman Lesher wrote:


Quote:
On Monday 26 May 2008 01:32:31 Ronald Wiplinger wrote:



Quote:
Tilghman Lesher wrote:



Quote:
On Monday 26 May 2008 00:46:16 Ronald Wiplinger wrote:



Quote:
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.
Back to top
atis at iq-labs.net
Guest





PostPosted: Mon May 26, 2008 4:41 am    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

On Mon, May 26, 2008 at 11:38 AM, Ronald Wiplinger <ronald at elmit.com> wrote:
Quote:
mkn0014 wrote:
Quote:
Ronald Wiplinger wrote:

Quote:
Tilghman Lesher wrote:


Quote:
On Monday 26 May 2008 01:32:31 Ronald Wiplinger wrote:



Quote:
Tilghman Lesher wrote:



Quote:
On Monday 26 May 2008 00:46:16 Ronald Wiplinger wrote:



Quote:
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
Back to top
marcus.franke at gmx.net
Guest





PostPosted: Mon May 26, 2008 5:46 am    Post subject: [asterisk-users] Ubuntu as remote MySQL server Reply with quote

On Mon, May 26, 2008 at 04:38:32PM +0800, Ronald Wiplinger wrote:
Quote:

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.


You're sure about this?

This was an Issue when updating from mysql 4.0 to 4.1 but should be
no problem today.
Quote:
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.

Just comment out the bind-address Option in your my.cnf and the
mysql server should bind to all interfaces.



regards,
Marcus
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services