Cannot insert or update a datetime column with 'yyyy-MM-dd hh:mm:ss' format : <p>I've been trying to wrap my head around what the actual problem is.
I'm thinking it might be collation, When I did </p>

<pre><code>SELECT @@character_set_database, @@collation_database;
</code></pre>

<p>I got this</p>

<pre><code>+--------------------------+----------------------+
| @@character_set_database | @@collation_database |
+--------------------------+----------------------+
| latin1                   | latin1_swedish_ci    |
+--------------------------+----------------------+
</code></pre>

<p>the mysql workbench has utf8 - default collation as standard. </p>

<p>this is the table I want to update/insert into.</p>

<pre><code>+------------+----------+------+-----+-------------------+----------------+
| Field      | Type     | Null | Key | Default           | Extra          |
+------------+----------+------+-----+-------------------+----------------+
| id         | int(11)  | NO   | PRI | NULL              | auto_increment |
| from       | datetime | YES  |     | NULL              |                |
| to         | datetime | YES  |     | NULL              |                |
| breakhours | float    | NO   |     | 0.5               |                |
| created    | datetime | NO   |     | CURRENT_TIMESTAMP |                |
| assignment | int(11)  | NO   | MUL | NULL              |                |
+------------+----------+------+-----+-------------------+----------------+
</code></pre>

<p>this is what happens when I try to insert an entry manually with the mysql console, doesn't work with mysql workbench either.</p>

<pre><code>mysql&gt; insert into TimeEntry(from, to, breakhours, assignment) values('2019-09-14 07:45', '2019-09-14 16:45', 0.5, 1);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from, to, breakhours, assignment) values('2019-09-14 07:45', '2019-09-14 16:45',' at line 1
</code></pre>

<p>So I put an empty entry into the table</p>

<pre><code>+----+------+------+------------+---------------------+------------+
| id | from | to   | breakhours | created             | assignment |
+----+------+------+------------+---------------------+------------+
|  2 | NULL | NULL |        0.5 | 2019-09-15 18:51:24 |          1 |
+----+------+------+------------+---------------------+------------+
</code></pre>

<p>but I can't even update from or to here.</p>

<pre><code>mysql&gt; update TimeEntry set from = '2019-09-14 07:45:00' where id = 2;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from = '2019-09-14 07:45:00' where id = 2' at line 1
</code></pre>

<p>I've been using MySql for years, I've never encountered this problem before, what am I doing wrong?</p>
