Motion - Support Question 2008x 11x 24x 152809

Not insert mysql records in my DB

Question

I installed the latest version of the motion, I have completed and everything worked properly except for the inclusion of

records in the mysql DB. In the config file I have setting the parameters of access to the DB and have enabled the sql_query. When I launch motion there isn't errors, everything worked properly only the record of snapshot etc. etc. are not included

in my DB. What can I control?

Thank you Stefano
############################################################
# Common Options For MySQL and PostgreSQL database features.
# Options require the MySQL/PostgreSQL options to be active also.
############################################################

# Log to the database when creating motion triggered image file  (default: on)
sql_log_image on

# Log to the database when creating a snapshot image file (default: on)
sql_log_snapshot on

# Log to the database when creating motion triggered mpeg file (default: off)
sql_log_mpeg on

# Log to the database when creating timelapse mpeg file (default: off)
sql_log_timelapse on

# SQL query string that is sent to the database
# Use same conversion specifiers has for text features
# Additional special conversion specifiers are
# %n = the number representing the file_type
# %f = filename with full path
# Default value:
sql_query insert into security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', 

'%Y-%m-%d %T', '%C')

############################################################
# Database Options For MySQL
############################################################

# Mysql database to log to (default: not defined)
mysql_db my_db_name

# The host on which the database is located (default: localhost)
mysql_host localhost

# User account name for MySQL database (default: not defined)
mysql_user root

# User password for MySQL database (default: not defined)
mysql_password my_db_password

Environment

Motion version: 3.2.11
ffmpeg version: libavutil 1d.49.3.0, libavcodec: 1d.51.38.0, libavformat: 1d.51.10.0
Libraries: ffmpeg, mysql
Server OS: Ubuntu 8.10, kernel 2.6.24-21-generic

-- StefanoAprile - 24 Nov 2008

Answer

I bet you didn't check your mysql logs , probably you didn't create the good table / database or the sql query is not matching your table definition.

http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuideSpecialFeatures#Using_Databases

http://www.lavrsen.dk/twiki/bin/view/Motion/MotionGuideSpecialFeatures#MySQL

-- AngelCarpintero - 25 Nov 2008
Topic revision: r2 - 25 Nov 2008, AngelCarpintero
Copyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.