Send Motion-user mailing list submissions to motion-user@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/motion-user or, via email, send a message with subject or body 'help' to motion-user-requ...@lists.sourceforge.net You can reach the person managing the list at motion-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Motion-user digest..." Today's Topics: 1. Re: Not writing to database (David Powell) 2. Re: Not writing to database (MrDave) ---------------------------------------------------------------------- Message: 1 Date: Sat, 10 Nov 2018 06:04:42 -0600 From: David Powell <da...@depowell.com> To: Motion discussion list <motion-user@lists.sourceforge.net> Subject: Re: [Motion-user] Not writing to database Message-ID: <b2c5a8d1-cde9-af97-4971-46f8b1537...@depowell.com> Content-Type: text/plain; charset="utf-8"; Format="flowed" That's a brilliant idea.? I tried it and got no message, so apparently mySQL support is not in there. I tried running /./configure/ and sure enough, it says *MYSQL support:?????? No* Of course, I do have mySQL installed, but apparently not the bits that are necessary to integrate it into Motion.? What magic incantation do I need to get them? I originally used /sudo apt-get install mysql-server/ to install mySQL. Thanks, David On 11/9/18 7:55 PM, MrDave wrote: > > I would suggest trying to put in a INCORRECT user or password and > validate that the log? reports > > "Cannot connect to MySQL database %s on host %s with user %s" > > If Motion does report that message, then we know that Motion is > connecting to the database.? If it does not report that message, then > that means that Motion did not find the mysql packages when it was > compiled.? Per the message from genius3000, you'd then need to go back > to ./configure and check the messages. > > Dave > On 11/9/2018 2:07 PM, Mike Wilson wrote: >> Well, that is good progress and good to know we don't need an issue >> over it. Let us know what you?find out. >> >> On Fri, Nov 9, 2018 at 3:37 PM David Powell <da...@depowell.com >> <mailto:da...@depowell.com>> wrote: >> >> I tried adding the */sql_query_start/* but it didn't help.? It's >> as if Motion is ignoring any database directives.? I tried >> checking the logs in MySQL but can't seem to read them for some >> reason (I suppose they're encrypted, but the MySQL workbench is >> being persnickety about showing them to me. Cat-ing the MySQL log >> files shows only hieroglyphics). >> >> I'm sure the problem is not in MySQL because I can use that same >> query to insert rows into the database using SQuirreL without any >> problems. >> >> David >> >> >> On 11/9/18 1:56 PM, Mike Wilson wrote: >>> The goal has always been to support that case, but there could >>> be a bug related to the changes to support tying the events >>> together for video and pictures. I use: >>> >>> sql_query insert into security_file(camera, event_id, filename, >>> frame, file_type, time_stamp) values('%t', '%{dbeventid}', '%f', >>> '%q', '%n', '%Y-%m-%d %T') >>> sql_query_start insert into security_events (camera, >>> event_time_stamp) values('%t', '%Y-%m-%d %T') >>> >>> This might help you. It is worth a try if nothing else. If this >>> does work and the query alone doesn't, I would be sure to file a >>> bug so we can sort that out. >>> >>> What I'm doing here with sql_query_start is generating an event >>> in my security_events table and then using the ID that it >>> generates to tag each video and picture so I don't have to guess >>> later on my front-end. >>> >>> On Fri, Nov 9, 2018 at 2:49 PM David Powell <da...@depowell.com >>> <mailto:da...@depowell.com>> wrote: >>> >>> This database issue is driving me nuts.? I'm using version >>> 4.1.1+git20181002-062a328 of Motion and everything seems to >>> work OK, >>> except it won't write events to the MySQL database. I'm sure >>> it's >>> something I'm not doing right but I can't see it. There are >>> no errors in >>> the log at any logging level. I have the config file set with: >>> >>> database_type mysql >>> database_dbname cameras >>> database_host localhost >>> database_port 3306 >>> database_user root >>> database_password <redacted> >>> database_busy_timeout 0 >>> sql_log_picture on >>> sql_log_snapshot off >>> sql_log_movie on >>> sql_log_timelapse off >>> sql_query INSERT INTO cameras.events >>> >>> (server_number,camera_number,event_number,event_date,video_length,filename) >>> >>> VALUES (2,%t,%v,{ts '%C'},null,'%v-%Y%m%d%H%M%S'); >>> >>> Nothing gets written to the database, and no errors are >>> reported in the >>> log file.? What am I doing wrong? >>> >>> David >>> >>> >>> >>> _______________________________________________ >>> Motion-user mailing list >>> Motion-user@lists.sourceforge.net >>> <mailto:Motion-user@lists.sourceforge.net> >>> https://lists.sourceforge.net/lists/listinfo/motion-user >>> https://motion-project.github.io/ >>> >>> Unsubscribe: >>> https://lists.sourceforge.net/lists/options/motion-user >>> >>> >>> >>> _______________________________________________ >>> Motion-user mailing list >>> Motion-user@lists.sourceforge.net >>> <mailto:Motion-user@lists.sourceforge.net> >>> https://lists.sourceforge.net/lists/listinfo/motion-user >>> https://motion-project.github.io/ >>> >>> Unsubscribe:https://lists.sourceforge.net/lists/options/motion-user >> _______________________________________________ >> Motion-user mailing list >> Motion-user@lists.sourceforge.net >> <mailto:Motion-user@lists.sourceforge.net> >> https://lists.sourceforge.net/lists/listinfo/motion-user >> https://motion-project.github.io/ >> >> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user >> >> >> >> >> >> _______________________________________________ >> Motion-user mailing list >> Motion-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/motion-user >> https://motion-project.github.io/ >> >> Unsubscribe:https://lists.sourceforge.net/lists/options/motion-user > > > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ Message: 2 Date: Sat, 10 Nov 2018 07:21:03 -0700 From: MrDave <motionmrd...@gmail.com> To: motion-user@lists.sourceforge.net Subject: Re: [Motion-user] Not writing to database Message-ID: <c63b8a1a-727c-1ca5-3596-dd16f2640...@gmail.com> Content-Type: text/plain; charset="utf-8"; Format="flowed" It depends upon your distribution and version.? The building documentation has the ones that I'm aware of. https://motion-project.github.io/motion_build.html On 11/10/2018 5:04 AM, David Powell wrote: > > That's a brilliant idea.? I tried it and got no message, so apparently > mySQL support is not in there. > > I tried running /./configure/ and sure enough, it says > > *MYSQL support:?????? No* > > Of course, I do have mySQL installed, but apparently not the bits that > are necessary to integrate it into Motion.? What magic incantation do > I need to get them? I originally used /sudo apt-get install > mysql-server/ to install mySQL. > > Thanks, David > > > On 11/9/18 7:55 PM, MrDave wrote: >> >> I would suggest trying to put in a INCORRECT user or password and >> validate that the log? reports >> >> "Cannot connect to MySQL database %s on host %s with user %s" >> >> If Motion does report that message, then we know that Motion is >> connecting to the database.? If it does not report that message, then >> that means that Motion did not find the mysql packages when it was >> compiled.? Per the message from genius3000, you'd then need to go >> back to ./configure and check the messages. >> >> Dave >> On 11/9/2018 2:07 PM, Mike Wilson wrote: >>> Well, that is good progress and good to know we don't need an issue >>> over it. Let us know what you?find out. >>> >>> On Fri, Nov 9, 2018 at 3:37 PM David Powell <da...@depowell.com >>> <mailto:da...@depowell.com>> wrote: >>> >>> I tried adding the */sql_query_start/* but it didn't help.? It's >>> as if Motion is ignoring any database directives.? I tried >>> checking the logs in MySQL but can't seem to read them for some >>> reason (I suppose they're encrypted, but the MySQL workbench is >>> being persnickety about showing them to me. Cat-ing the MySQL >>> log files shows only hieroglyphics). >>> >>> I'm sure the problem is not in MySQL because I can use that same >>> query to insert rows into the database using SQuirreL without >>> any problems. >>> >>> David >>> >>> >>> On 11/9/18 1:56 PM, Mike Wilson wrote: >>>> The goal has always been to support that case, but there could >>>> be a bug related to the changes to support tying the events >>>> together for video and pictures. I use: >>>> >>>> sql_query insert into security_file(camera, event_id, filename, >>>> frame, file_type, time_stamp) values('%t', '%{dbeventid}', >>>> '%f', '%q', '%n', '%Y-%m-%d %T') >>>> sql_query_start insert into security_events (camera, >>>> event_time_stamp) values('%t', '%Y-%m-%d %T') >>>> >>>> This might help you. It is worth a try if nothing else. If this >>>> does work and the query alone doesn't, I would be sure to file >>>> a bug so we can sort that out. >>>> >>>> What I'm doing here with sql_query_start is generating an event >>>> in my security_events table and then using the ID that it >>>> generates to tag each video and picture so I don't have to >>>> guess later on my front-end. >>>> >>>> On Fri, Nov 9, 2018 at 2:49 PM David Powell <da...@depowell.com >>>> <mailto:da...@depowell.com>> wrote: >>>> >>>> This database issue is driving me nuts.? I'm using version >>>> 4.1.1+git20181002-062a328 of Motion and everything seems to >>>> work OK, >>>> except it won't write events to the MySQL database.? I'm >>>> sure it's >>>> something I'm not doing right but I can't see it. There are >>>> no errors in >>>> the log at any logging level. I have the config file set with: >>>> >>>> database_type mysql >>>> database_dbname cameras >>>> database_host localhost >>>> database_port 3306 >>>> database_user root >>>> database_password <redacted> >>>> database_busy_timeout 0 >>>> sql_log_picture on >>>> sql_log_snapshot off >>>> sql_log_movie on >>>> sql_log_timelapse off >>>> sql_query INSERT INTO cameras.events >>>> >>>> (server_number,camera_number,event_number,event_date,video_length,filename) >>>> >>>> VALUES (2,%t,%v,{ts '%C'},null,'%v-%Y%m%d%H%M%S'); >>>> >>>> Nothing gets written to the database, and no errors are >>>> reported in the >>>> log file.? What am I doing wrong? >>>> >>>> David >>>> >>>> >>>> >>>> _______________________________________________ >>>> Motion-user mailing list >>>> Motion-user@lists.sourceforge.net >>>> <mailto:Motion-user@lists.sourceforge.net> >>>> https://lists.sourceforge.net/lists/listinfo/motion-user >>>> https://motion-project.github.io/ >>>> >>>> Unsubscribe: >>>> https://lists.sourceforge.net/lists/options/motion-user >>>> >>>> >>>> >>>> _______________________________________________ >>>> Motion-user mailing list >>>> Motion-user@lists.sourceforge.net >>>> <mailto:Motion-user@lists.sourceforge.net> >>>> https://lists.sourceforge.net/lists/listinfo/motion-user >>>> https://motion-project.github.io/ >>>> >>>> Unsubscribe:https://lists.sourceforge.net/lists/options/motion-user >>> _______________________________________________ >>> Motion-user mailing list >>> Motion-user@lists.sourceforge.net >>> <mailto:Motion-user@lists.sourceforge.net> >>> https://lists.sourceforge.net/lists/listinfo/motion-user >>> https://motion-project.github.io/ >>> >>> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Motion-user mailing list >>> Motion-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/motion-user >>> https://motion-project.github.io/ >>> >>> Unsubscribe:https://lists.sourceforge.net/lists/options/motion-user >> >> >> >> _______________________________________________ >> Motion-user mailing list >> Motion-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/motion-user >> https://motion-project.github.io/ >> >> Unsubscribe:https://lists.sourceforge.net/lists/options/motion-user > > > > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user -------------- next part -------------- An HTML attachment was scrubbed... ------------------------------ ------------------------------ Subject: Digest Footer _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user ------------------------------ End of Motion-user Digest, Vol 149, Issue 14 ********************************************