Discussion:
[Sqlgrey-users] Creating initial database tables
Alex
2015-09-21 00:01:44 UTC
Permalink
Hi guys,

I'm trying to build a new system to replace the one I reported some
time ago as having connect errors, and having some trouble building
the initial tables using mariadb.

I can login to the database as the sqlgrey user and create the tables
manually. However, when starting sqlgrey, the tables aren't
automatically created.

When trying to execute the SELECT that is run from within
table_exists, I get the following:

MariaDB [(none)]> use sqlgrey;
Database changed
MariaDB [sqlgrey]> SELECT 1 from connect LIMIT 0;
ERROR 1146 (42S02): Table 'sqlgrey.connect' doesn't exist

There is something in the table_exists() function that says SQL error
reporting needs to be turned off at connect time. Is that an sqlgrey
setting or a mariadb setting?

Any ideas greatly appreciated.
Thanks,
Alex

------------------------------------------------------------------------------
Alex
2015-09-26 16:22:38 UTC
Permalink
Hi, I posted the message below a few days ago, and haven't received
any replies, and I'm really stuck.

I followed the directions in the HOWTO for configuring sqlgrey to be
used with mysql/mariadb, and just don't understand why it's not
creating the tables.

When I connect this new database to the master, slave status says this:

Last_SQL_Error: Error 'Table 'sqlgrey.domain_awl' doesn't exist' on
query. Default database: 'sqlgrey'. Query: 'UPDATE domain_awl SET
last_seen = NOW(), first_seen = first_seen WHERE sender_domain =
'bounce.twitter.com' AND src = '199.59.150''

I'd sure appreciate any ideas.
Thanks,
Alex
Post by Alex
Hi guys,
I'm trying to build a new system to replace the one I reported some
time ago as having connect errors, and having some trouble building
the initial tables using mariadb.
I can login to the database as the sqlgrey user and create the tables
manually. However, when starting sqlgrey, the tables aren't
automatically created.
When trying to execute the SELECT that is run from within
MariaDB [(none)]> use sqlgrey;
Database changed
MariaDB [sqlgrey]> SELECT 1 from connect LIMIT 0;
ERROR 1146 (42S02): Table 'sqlgrey.connect' doesn't exist
There is something in the table_exists() function that says SQL error
reporting needs to be turned off at connect time. Is that an sqlgrey
setting or a mariadb setting?
Any ideas greatly appreciated.
Thanks,
Alex
------------------------------------------------------------------------------
Karl O. Pinc
2015-09-26 17:44:32 UTC
Permalink
On Sat, 26 Sep 2015 12:22:38 -0400
Post by Alex
Hi, I posted the message below a few days ago, and haven't received
any replies, and I'm really stuck.
I followed the directions in the HOWTO for configuring sqlgrey to be
used with mysql/mariadb, and just don't understand why it's not
creating the tables.
Last_SQL_Error: Error 'Table 'sqlgrey.domain_awl' doesn't exist' on
query. Default database: 'sqlgrey'. Query: 'UPDATE domain_awl SET
last_seen = NOW(), first_seen = first_seen WHERE sender_domain =
'bounce.twitter.com' AND src = '199.59.150''
I'd sure appreciate any ideas.
Look in your database logs to see why the tables didn't
create. If there's nothing, then reconfigure the db to log
errors and try again.



Karl <***@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein

------------------------------------------------------------------------------
Alex
2015-09-29 16:22:03 UTC
Permalink
Hi,
Post by Karl O. Pinc
Look in your database logs to see why the tables didn't
create. If there's nothing, then reconfigure the db to log
errors and try again.
So I migrated my sqlgrey.conf from the working system, and it didn't
have the db_dsn line uncommented:

# db_dsn = DBI:mysql:database=sqlgrey;host=localhost;port=3306

That value is null by default, so perhaps there should be a separate
check for that?

Apparently my logging wasn't set up the way I expected, because it
wasn't logging these failures to connect to the database.

Thanks,
Alex

------------------------------------------------------------------------------
Loading...