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: MySQL - access denied (Bill Visick)


----------------------------------------------------------------------

Message: 1
Date: Fri, 19 Mar 2021 09:55:30 +0000 (GMT)
From: Bill Visick <bvis...@btinternet.com>
To: Bill Visick <bvis...@btinternet.com>,  Motion discussion list
        <motion-user@lists.sourceforge.net>
Subject: Re: [Motion-user] MySQL - access denied
Message-ID: <4b8dd29f.26d41.17849e9527b.webtop...@btinternet.com>
Content-Type: text/plain; charset="utf-8"; Format="flowed"


Try adding also database name, like this:./mysql -u root -p clipsDoes it 
work that way?
Yes it does and I can list the contents of the tables without any 
problem. It does appear as if motion is somehow not sending the right 
credentials: the error reported in motion.log is


MySQL error was Access denied for user 'root'@'localhost' (using 
password: YES)

I don't know where the single quotes are coming from, they are not in my 
.conf file. If I try to log in from the command line and include the 
single quotes:

./mysql -u 'root'@'localhost' -p

then I get

ERROR 1045 (28000): Access denied for user 'root@localhost'@'localhost' 
(using password: YES)

so mysql is somehow expanding the quoted userid to include localhost as 
well. Does that suggest what might be going wrong?



Regards
      Bill
+44 7901 954568


------ Original Message ------
From: "Bill Visick" <bvis...@btinternet.com>
To: "Motion discussion list" <motion-user@lists.sourceforge.net>
Sent: Thursday, 18 Mar, 21 At 12:19
Subject: Re: [Motion-user] MySQL - access denied

Thaanks to Tosaria for his comment, sorry I can't see how to respond 
directly to it!


Anyway, I understand motion can't fix mysql problems but was hoping 
there was maybe a config option that I'd set wrong somewhere.

On the command prompt I enter:
./mysql -u root -pxxxxxxxxxx

and get:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 41
Server version: 10.3.21-MariaDB Source distribution
etc.

For info, the user table has:
+-----------+------+
| host      | user |
+-----------+------+
| 127.0.0.1 | root |
| ::1       | root |
| localhost | root |
+-----------+------+

Could there be a path problem? At the command prompt I have to cd to the 
relevant directory first (/usr/local/mariadb10/bin) but the fact that 
motion says Access denied rather than being unable to find mysql 
suggests that's not the problem.



Regards
      Bill Visick


------ Original Message ------
From: "Bill Visick via Motion-user" <motion-user@lists.sourceforge.net>
To: motion-user@lists.sourceforge.net
Cc: "Bill Visick" <bvis...@btinternet.com>
Sent: Wednesday, 17 Mar, 21 At 17:31
Subject: [Motion-user] MySQL - access denied

I'm trying to insert records in a database but motion can't connect to 
it. I have the following in motion.conf:


database_type mysql
database_dbname clips
daabase_host localhost
database_port 3306
database_user root
database_password xxxxxxxxxxxxxxxx
sql_log_picture on
sql_log_snapshot on
sql_log_movie on
sql_query insert into motion(camera, filename, event, frame, file_type, 
time_stamp, text_event) values('%$_%t', '%f', '%v', '%q', '%n', 
'%Y-%m-%d %T', '%C')

In motion.log I get:

motion_init: Database backend mysql
motion_init: Cannot connect to MySQL database clips on host localhost 
with user root
motion_init: MySQL error was Access denied for user 'root'@'localhost' 
(using password: YES)
motion_loop: Thread exiting

I can log in to MySQL successfully using the same credentials from a 
command prompt.

I'm sure I'm missing something simple, thanks very much for any 
suggestions.


Bill Visick

  _______________________________________________
  Motion-user mailing list
  Motion-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/motion-user 
<https://lists.sourceforge.net/lists/listinfo/motion-user>
  https://motion-project.github.io/ <https://motion-project.github.io/>

  Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user 
<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 177, Issue 9
*******************************************

Reply via email to