btmon can't create a database and table

Post any 3rd party software here.
Post Reply
Atr
Posts: 1
Joined: Wed Aug 14, 2013 7:47 pm

btmon can't create a database and table

Post by Atr » Wed Aug 14, 2013 7:59 pm

I am using mysql database to save the data comming from GEM device reading from Serial port
the setup of mysql user is %100 working but the btmon can't create the database and the table
is there any way I can create it manualy using the counters Schema ?
or maybe use a sql command to gererate the table with the right filed name and type ?
mwall
Posts: 140
Joined: Wed Dec 07, 2011 6:25 pm

Re: btmon can't create a database and table

Post by mwall » Wed Aug 14, 2013 8:50 pm

what error are you seeing from btmon?

be sure that you grant appropriate permissions. for example, if btmon will connect as 'ecmuser' with password 'ecmpass' from host 'ecmclient', saving to the database 'ecm', you would do the following on the mysql server:

Code: Select all

mysql -u root -p
mysql> create user ecmuser identified by 'ecmpass'
mysql> create database ecm;
mysql> grant usage on ecm.* to ecmuser@ecmclient identified by 'ecmpass';
mysql> grant all privileges on ecm.* to ecmuser@ecmclient;
then when you run btmon it will create the table with schema as needed.

if you specify a mysql user that already has permission to create databases then you do not need to do the grants.

the actual sql to create a table is constructed on the fly and depends on the packet format you choose.

m
Post Reply