title: Data not inserted into table of mySQL (MariaDB)
body: <p>I am currently trying to implement a python script that would insert a couple of dummy values into a table of my SQL database (MariaDB). I am using Stretch OS on my Raspberry Pi.</p>
  
  <p>I first successfully created a table in an existing database in MariaDB.</p>
  
  <pre><code>MariaDB [testdb]&gt; CREATE table testdbtable (col1 char(1), col2 char(1), col3 char(1));
  Query OK, 0 rows affected (0.12 sec)
  </code></pre>
  
  <p>Using <code>show tables;</code> I can see testdbtable as my created table.</p>
  
  <pre><code>+------------------+
  | Tables_in_testdb |
  +------------------+
  | testdbtable      |
  +------------------+
  1 row in set (0.00 sec)
  </code></pre>
  
  <p>Using <code>show columns from testdbtable;</code> I get:</p>
  
  <pre><code>+-------+---------+------+-----+---------+-------+
  | Field | Type    | Null | Key | Default | Extra |
  +-------+---------+------+-----+---------+-------+
  | col1  | char(1) | YES  |     | NULL    |       |
  | col2  | char(1) | YES  |     | NULL    |       |
  | col3  | char(1) | YES  |     | NULL    |       |
  +-------+---------+------+-----+---------+-------+
  3 rows in set (0.00 sec)
  </code></pre>
  
  <p>I then created a python script:</p>
  
  <pre><code>#!/usr/bin/python
  import mysql.connector as mariadb 
  
  mariadb_connection = mariadb.connect(user='root', password='', database='testdb')
  
  cursor = mariadb_connection.cursor()
  
  cursor.execute("INSERT INTO testdbtable(col1, col2, col3) VALUES ('a', 'b', 'c')");
  
  mariadb_connection.close()
  </code></pre>
  
  <p>This script runs on terminal without any errors. However, when I run MariaDB on terminal, I do not see the dummy values (i.e. a,b,c) being inserted into this table from my script:</p>
  
  <pre><code>MariaDB [testdb]&gt; select * from testdbtable;
  Empty set (0.00 sec)
  </code></pre>
  
  <p>I appreciate if anyone can give me any advice on what I might have done wrong in my script?</p>