[asterisk-users] Ubuntu as remote MySQL server
Ronald Wiplinger
ronald at elmit.com
Sun May 25 23:31:27 CDT 2008
Tzafrir Cohen wrote:
> On Mon, May 26, 2008 at 11:59:11AM +0800, Ronald Wiplinger wrote:
>
>> 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
>
>> 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.
More information about the asterisk-users
mailing list