Re: Wammu and SGH-J700 with Xenial Xerus 16.04

gilberto dos santos alves <[email protected]> Fri, 25 Aug 2017 15:08:13 -0300
Newsgroups gmane.linux.drivers.gammu
Message-ID <CAP9G-NL1y+GCwhD4QDbQ2hhOnKsRD8w9x+DFGkh3K5kpZGjr2Q@mail.gmail.com>
hi. you have mysql error not gammu errors.
please create a empty database named gammudb;
insert this sql command for gammudb:

use gammudb;       <---- this command tells that script will use gammudb
for create table.

--
gilberto dos santos alves
+5511986465049






2017-08-25 13:58 GMT-03:00 cristian via Gammu-users <
[email protected]>:

> On Sat, 19 Aug 2017 23:49:17 -0300
> gilberto dos santos alves <[email protected]> wrote:
>
> > [1] https://pastebin.com/ZFy5ww5G
> > after some tests please look at your mysql privileges. please follow
> > procedures
> > on [1] to make shure that all things is fine with your smsd config and
> > mysql.
> > After that let me know what happens!
> >
>
> At first, I tried to follow https://wammu.eu/docs/manual/smsd/mysql.html
> official steps, creating mysql user, assigning database privileges to it
> and creating the database (using the three commands described as in
> https://wammu.eu/docs/manual/smsd/mysql.html#privileges ).
>
> Then, I've tried to run the mysql.sql script, but it generates a bunch of
> errors:
>
> mysql> source mysql.sql
> ERROR 1142 (42000): CREATE command denied to user 'cristian'@'localhost'
> for table 'daemons'
> ERROR 1142 (42000): CREATE command denied to user 'cristian'@'localhost'
> for table 'gammu'
> ERROR 1146 (42S02): Table 'gammu.gammu' doesn't exist
> ERROR 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'TextDecoded'
> can't have a default value
> ERROR 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'TextDecoded'
> can't have a default value
> ERROR 1142 (42000): INDEX command denied to user 'cristian'@'localhost'
> for table 'outbox'
> ERROR 1142 (42000): INDEX command denied to user 'cristian'@'localhost'
> for table 'outbox'
> ERROR 1142 (42000): CREATE command denied to user 'cristian'@'localhost'
> for table 'outbox_multipart'
> ERROR 1142 (42000): CREATE command denied to user 'cristian'@'localhost'
> for table 'pbk'
> ERROR 1142 (42000): CREATE command denied to user 'cristian'@'localhost'
> for table 'pbk_groups'
> ERROR 1142 (42000): CREATE command denied to user 'cristian'@'localhost'
> for table 'phones'
> ERROR 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'TextDecoded'
> can't have a default value
> ERROR 1142 (42000): INDEX command denied to user 'cristian'@'localhost'
> for table 'sentitems'
> ERROR 1142 (42000): INDEX command denied to user 'cristian'@'localhost'
> for table 'sentitems'
> ERROR 1142 (42000): INDEX command denied to user 'cristian'@'localhost'
> for table 'sentitems'
> ERROR 1142 (42000): INDEX command denied to user 'cristian'@'localhost'
> for table 'sentitems'
> ERROR 1142 (42000): TRIGGER command denied to user 'cristian'@'localhost'
> for table 'inbox'
> ERROR 1142 (42000): TRIGGER command denied to user 'cristian'@'localhost'
> for table 'outbox'
> ERROR 1142 (42000): TRIGGER command denied to user 'cristian'@'localhost'
> for table 'phones'
> ERROR 1142 (42000): TRIGGER command denied to user 'cristian'@'localhost'
> for table 'sentitems'
> mysql> show tables;
> Empty set (0,00 sec)
>
> I've added some privileges to mysql user for the database:
>
> mysql> SHOW GRANTS;
> +-----------------------------------------------------------
> ------------------------------------------+
> | Grants for cristian@localhost
>                              |
> +-----------------------------------------------------------
> ------------------------------------------+
> | GRANT USAGE ON *.* TO 'cristian'@'localhost'
>                             |
> | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, INDEX, TRIGGER ON
> `gammu`.* TO 'cristian'@'localhost' |
> +-----------------------------------------------------------
> ------------------------------------------+
> 2 rows in set (0,00 sec)
>
> as shown by command output, but I continue to get errors:
>
> ERROR 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'TextDecoded'
> can't have a default value
> ERROR 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'TextDecoded'
> can't have a default value
> ERROR 1146 (42S02): Table 'gammu.outbox' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.outbox' doesn't exist
> ERROR 1050 (42S01): Table 'outbox_multipart' already exists
> ERROR 1050 (42S01): Table 'pbk' already exists
> ERROR 1050 (42S01): Table 'pbk_groups' already exists
> ERROR 1067 (42000): Invalid default value for 'InsertIntoDB'
> ERROR 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'TextDecoded'
> can't have a default value
> ERROR 1146 (42S02): Table 'gammu.sentitems' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.sentitems' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.sentitems' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.sentitems' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.inbox' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.outbox' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.phones' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.sentitems' doesn't exist
>
> So, if I run gammu-smsd command, it fails, as usual. After I run the mysql
> script, database tables are as following:
>
> mysql> show tables;
> +------------------+
> | Tables_in_gammu  |
> +------------------+
> | daemons          |
> | gammu            |
> | outbox_multipart |
> | pbk              |
> | pbk_groups       |
> +------------------+
> 5 rows in set (0,00 sec)
>
> If you want, I can paste result of 'describe gammu;' and 'describe
> outbox_multipart;' commands.
>
> Then, I've tried to build and install gammu from sources, as you've
> suggested in description (located on pastebin named 'test for smsd-gammu
> connection').
>
> It's needed to change ldconfig configuration (because gammu and gammu-smsd
> libraries are located in /usr/local/lib, if gammu is installed from
> sources), in order to use gammu and gammu-smsd from command line as usual.
>
> I've repeated the steps again (creating mysql user, assigning database
> privileges to it and creating the database), always executing the three
> commands described as in https://wammu.eu/docs/manual/
> smsd/mysql.html#privileges official documentation.
>
> So, I've got mysql.sql from /usr/local/share/doc/gammu/examples/sql
> directory, but when I run the script, it generated errors as described at
> the beginning.
>
> Finally, I've tried to run mysql.sql script using mysql 'root' user in
> place of mysql 'cristian' user. Unfortunately, I continue to get several
> errors:
>
> mysql> source mysql.sql
> Query OK, 0 rows affected (0,74 sec)
>
> Query OK, 1 row affected (0,00 sec)
>
> ERROR 1067 (42000): Invalid default value for 'ReceivingDateTime'
> ERROR 1067 (42000): Invalid default value for 'InsertIntoDB'
> ERROR 1146 (42S02): Table 'gammu.outbox' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.outbox' doesn't exist
> Query OK, 0 rows affected (0,08 sec)
>
> ERROR 1067 (42000): Invalid default value for 'InsertIntoDB'
> ERROR 1067 (42000): Invalid default value for 'InsertIntoDB'
> ERROR 1146 (42S02): Table 'gammu.sentitems' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.sentitems' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.sentitems' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.sentitems' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.inbox' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.outbox' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.phones' doesn't exist
> ERROR 1146 (42S02): Table 'gammu.sentitems' doesn't exist
>
> and only two tables are created:
>
> mysql> show tables;
> +------------------+
> | Tables_in_gammu  |
> +------------------+
> | gammu            |
> | outbox_multipart |
> +------------------+
> 2 rows in set (0,01 sec)
>
> Any ideas?
>
> I'll expect a reply,
>
> Thanks.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gammu-users mailing list - https://lists.sourceforge.net/
> lists/listinfo/gammu-users
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Gammu-users mailing list - https://lists.sourceforge.net/lists/listinfo/gammu-users