Create a database for testing purpose using the command line tool.
# Invoke mysql client from command line to get MariaDB command prompt
mysql
# Create database
CREATE DATABASE <Your Database Name>;
# Switch to newly created database
USE <YourDatabaseName>;
# Create table in database with different columns
CREATE TABLE <YourTableName> ( <ColoumnName1> <datatype1>, <ColoumnName2> <datatype2>, ..);
# Insert some dummy data into table
INSERT INTO <YourTableName> VALUES (<DummyData1>, DummyData1>, ...);
# View table
SELECT * FROM <YourTableName> ;
#exit from MariaDB client prmot
quit
The output for the test database and table that you created in step 4 should look as follows.
mysql> USE TestDB;
Database changed
mysql> CREATE TABLE Persons ( PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) );
Query OK, 0 rows affected (0.02 sec)
mysql> INSERT INTO Persons VALUES (102, 'LMN', 'PQR', 'abc road', 'xyz city');
Query OK, 1 row affected (0.01 sec)
mysql> mysql>INSERT INTO Persons VALUES (101, 'ABC', 'DEF', 'xyz road', 'Pune');
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 'mysql>INSERT INTO Persons VALUES (101, 'ABC', 'DEF', 'xyz road', 'Pune')' at line 1
mysql> INSERT INTO Persons VALUES (101, 'ABC', 'DEF', 'xyz road', 'Pune');
Query OK, 1 row affected (0.01 sec)
mysql> SELECT * FROM Persons;
+----------+----------+-----------+----------+----------+
| PersonID | LastName | FirstName | Address | City |
+----------+----------+-----------+----------+----------+
| 102 | LMN | PQR | abc road | xyz city |
| 101 | ABC | DEF | xyz road | Pune |
+----------+----------+-----------+----------+----------+
2 rows in set (0.00 sec)
mysql> quit
Bye