- Create database moviedb
- mysql> create database moviedb3;
- Use database
- mysql> use moviedb3;
- Import schema
- mysql> source ./createtable.sql
- Populate database
- mysql> source ./data.sql;
- Create database moviedb
- shell> echo "create database moviedb;" | mysql -u root -p
- Import schema
- shell> mysql -u root -p -D moviedb < createtable.sql
- Populate database
- shell> mysql -u root -p -D moviedb < data.sql
- show databases;
- show tables;
- use <dbname>;
- describe <dbname>.<tablename>; (ex. describe moviedb.movies;)
-
To compile:
- shell> make
-
To run:
- shell> make r
-
To compile and run:
- shell> make run
-
To remove class files:
- shell> make clean