kenuheoyimacbookpro-4:docs kenu$ mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6081
Server version: 5.5.8 MySQL Community Server (GPL)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> grant all privileges on *.* to spring@localhost
-> identified by 'book' with grant option;
Query OK, 0 rows affected (0.04 sec)
mysql> create database springbook;
Query OK, 1 row affected (0.02 sec)
mysql> use springbook;
Database changed
mysql> create table users (
-> id varchar(10) primary key,
-> name varchar(20) not null,
-> password varchar(10) not null
-> );
Query OK, 0 rows affected (0.46 sec)
mysql>