Use the following MySQL commands to create a user and database, and exit MySQL from the command line:
mysql>CREATE DATABASE memcachedSample; mysql>CREATE USER 'web20'@'localhost' IDENTIFIED BY 'web20'; mysql>GRANT ALL PRIVILEGES ON memcachedSample.* TO 'web20'@'localhost'; mysql>exit;
The code above is from the article Using MySQL and Memcached on the GlassFish Application Server.
Or
Create a table from the MySQL Workbench documentation:
mysql> CREATE TABLE pet (name VARCHAR(20), owner VARCHAR(20),
-> species VARCHAR(20), sex CHAR(1), birth DATE, death DATE);
To verify that your table was created the way you expected, use a DESCRIBE statement:
mysql> DESCRIBE pet; +---------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+-------------+------+-----+---------+-------+ | name | varchar(20) | YES | | NULL | | | owner | varchar(20) | YES | | NULL | | | species | varchar(20) | YES | | NULL | | | sex | char(1) | YES | | NULL | | | birth | date | YES | | NULL | | | death | date | YES | | NULL | | +---------+-------------+------+-----+---------+-------+