[SR-Users] kamdbctl create ? (solved)

Thomas Secula tsecula at comcast.net
Mon Nov 18 22:29:31 CET 2013


GRANT ALL PRIVILEGES ON *.* TO root@'172.16.101.27' IDENTIFIED BY 'sonus';

Did not help only when I did:

GRANT ALL PRIVILEGES ON *.* TO root@'172.16.101.27' IDENTIFIED BY 'sonus'
WITH GRANT OPTION;


Was I able to execute kamdbctl create remotely.




-----Original Message-----
From: sr-users-bounces at lists.sip-router.org
[mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Thomas Secula
Sent: Sunday, November 17, 2013 8:02 AM
To: 'Kamailio (SER) - Users Mailing List'
Subject: Re: [SR-Users] kamdbctl create ?

Thanks Fred,

This is where I seem to be in the catch 22.

I drop the database and grant all on kamailio:

mysql> drop database kamailio;
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL ON kamailio.* to 'root'@'172.16.101.27' IDENTIFIED BY
'sonus';
Query OK, 0 rows affected (0.00 sec)

But when I then run kamdbctl create I get:

root at pcscf:/usr/lib64/kamailio/kamctl# kamdbctl create MySQL password for
root:
database engine 'mysql' loaded
INFO: test server charset
INFO: creating database kamailio ...
INFO: granting privileges to database kamailio ...
ERROR 1044 (42000) at line 1: Access denied for user 'root'@'172.16.101.27'
to database 'kamailio'
ERROR: granting privileges to database kamailio failed!

mysql> show tables from kamailio;
Empty set (0.00 sec)

I wonder if I should copy all the files from my kamailio host used by
kamdbctl and run it locally on the mysql server?
Seems like that's killing a fly with a bulldozer....


-----Original Message-----
From: sr-users-bounces at lists.sip-router.org
[mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Fred Posner
Sent: Saturday, November 16, 2013 5:06 PM
To: sr-users at lists.sip-router.org
Subject: Re: [SR-Users] kamdbctl create ?

 From the error, it looks like the tables, etc were created and the failure
was in granting the privileges.

You can always grant them manually, or drop the kamailio database and try
the script again.

Fred Posner | The Palner Group
direct: 503-914-0999 | fax: 954-472-2896

On 11/16/2013 04:10 PM, Thomas Secula wrote:
> I seem to be in a catch 22, sure it's something I've done wrong.
>
> I set dbhost in kamctlrc to be the ip of my remote mysql server
>
> I run kamdbctl create and I get
>
> root at pcscf:/etc/kamailio# kamdbctl create
>
> MySQL password for root:
>
> database engine 'mysql' loaded
>
> INFO: test server charset
>
> INFO: creating database kamailio ...
>
> INFO: granting privileges to database kamailio ...
>
> ERROR 1044 (42000) at line 1: Access denied for user 
> 'root'@'172.16.101.27' to database 'kamailio'
>
> ERROR: granting privileges to database kamailio failed!
>
> root at pcscf:/etc/kamailio#
>
> Before I run the create from mysql:
>
> mysql>  select user,host from mysql.user;
>
> +------+---------------+
>
> | user | host          |
>
> +------+---------------+
>
> | root | %             |
>
> | root | 172.16.101.27 |
>
> | root | 172.16.101.28 |
>
> | root | 172.16.101.29 |
>
> | root | localhost     |
>
> +------+---------------+
>
> 5 rows in set (0.00 sec)
>
> mysql> show grants for 'root'@'%';
>
>
+-----------------------------------------------------------------------
+----
-----------------------------------+
>
> | Grants for
> root@%
> |
>
>
+-----------------------------------------------------------------------
+----
-----------------------------------+
>
> | GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY PASSWORD
> '*FE04940F3F9B339AB9361B2D01AD3D940B215B52' |
>
>
+-----------------------------------------------------------------------
+----
-----------------------------------+
>
> 1 row in set (0.00 sec)
>
> If I rerun it the create scripts says:
>
> root at pcscf:/etc/kamailio# kamdbctl create
>
> MySQL password for root:
>
> database engine 'mysql' loaded
>
> INFO: test server charset
>
> INFO: creating database kamailio ...
>
> ERROR 1007 (HY000) at line 1: Can't create database 'kamailio'; 
> database exists
>
> ERROR: Creating database kamailio failed!
>
> root at pcscf:/etc/kamailio#
>
> any ideas?
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> list sr-users at lists.sip-router.org 
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




More information about the sr-users mailing list