At this point, you should now be logged into MySQL with ALL privileges granted for the database tietokantadb (or a database that was created for you), so you’re ready to create your first table. Make sure the correct database is in use by typing the following
(replacing tietokantadb with the name of your database if it is different):
USE tietokantadb;
The final two words in this command require a little explanation.
MySQL can process queries in many different ways internally, and
these different ways are supported by different engines. From version
5.6 onwards InnoDB is the default storage engine for MySQL,
and we use it here because it supports FULLTEXT searches. So long
as you have a relatively up-to-date version of MySQL :), you can omit
the ENGINE InnoDB section of the command when creating a table,
but I have kept it in for now to emphasize that this is the engine
being used.
CREATE TABLE classics (author VARCHAR(128), title
VARCHAR(128), type VARCHAR(16), year CHAR(4)) ENGINE
InnoDB;
But MySQL commands can be long and complicated, so I recommend
using the format shown 🙂