JDBC Tutorials - Herong's Tutorial Notes
Dr. Herong Yang, Version 2.11

Creating Database and User with MySQL Monitor

This section describes how to create a new database and a new user with MySQL monitor.

MySQL server organizes database objects into databases. In order to test JDBC driver for MySQL server, I created a new database called, HerongDB, and a new user, Herong, with the MySQL command line interface:

C:\>\local\mysql\bin\mysql -u root

mysql> CREATE DATABASE HerongDB;
Query OK, 1 row affected (0.03 sec)

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| herongdb           |
| mysql              |
| test               |
+--------------------+
4 rows in set (0.00 sec)

mysql> CREATE USER Herong IDENTIFIED BY 'TopSecret';
Query OK, 0 rows affected (2.75 sec)

mysql> GRANT ALL ON HerongDB.* TO Herong;
Query OK, 0 rows affected (0.34 sec)

Now I am ready to login to the MySQL server with "Herong" and use "HerongDB" through Java JDBC interface.

Table of Contents

 About This Book

 JDBC (Java Database Connectivity) Introduction

 Downloading and Installing JDK - Java SE

 Installing and Running Java DB - Derby

 Derby (Java DB) JDBC Driver

 Derby (Java DB) JDBC DataSource Objects

 Java DB (Derby) - DML Statements

 Java DB (Derby) - ResultSet Objects of Queries

 Java DB (Derby) - PreparedStatement

MySQL Installation on Windows

 MySQL 5.0 Download, Installation and Start

 mysqladmin - MySQL Admin Tool

 mysql - Command Line Tool

Creating Database and User with MySQL Monitor

 MySQL JDBC Driver (MySQL Connector/J)

 MySQL - PreparedStatement

 MySQL - Reference Implementation of JdbcRowSet

 MySQL - JBDC CallableStatement

 MySQL CLOB (Character Large Object) - TEXT

 MySQL BLOB (Binary Large Object) - BLOB

 Oracle Express Edition Installation on Windows

 Oracle JDBC Drivers

 Oracle - Reference Implementation of JdbcRowSet

 Oracle - PreparedStatement

 Oracle - JBDC CallableStatement

 Oracle CLOB (Character Large Object) - TEXT

 Oracle BLOB (Binary Large Object) - BLOB

 Microsoft SQL Server 2005 Express Edition

 Microsoft JDBC Driver for SQL Server - sqljdbc.jar

 Microsoft JDBC Driver - Query Statements and Result Sets

 Microsoft JDBC Driver - DatabaseMetaData Object

 Microsoft JDBC Driver - DDL Statements

 Microsoft JDBC Driver - DML Statements

 SQL Server - PreparedStatement

 SQL Server CLOB (Character Large Object) - TEXT

 SQL Server BLOB (Binary Large Object) - BLOB

 JDBC-ODBC Bridge Driver - sun.jdbc.odbc.JdbcOdbcDriver

 JDBC-ODBC Bridge Driver - Flat Text Files

 JDBC-ODBC Bridge Driver - MS Access

 JDBC-ODBC Bridge Driver - MS SQL Server

 Summary of JDBC Drivers and Database Servers

 Additional Tutorial Notes to Be Added

 References

 PDF Printing Version

Dr. Herong Yang, updated in 2007
Creating Database and User with MySQL Monitor