JDBC Tutorials - Herong's Tutorial Examples - v3.12, by Dr. Herong Yang
MySQL Installation on macOS
This section describes how to download, install and start MySQL server on macOS systems.
MySQL database server is a good alternative to Oracle and SQL Server, if you are looking for a free database server. Here is what I did to install MySQL database on macOS.
1. Go to MySQL download Website at https://dev.mysql.com/downloads/mysql/.
2. Click "Download" next to "macOS 10.14 (x86, 64-bit), DMG Archive". Enter your Oracle login name and password to start the download.
3. Double-click the download file mysql-8.0.17-macos10.14-x86_64.dmg in the Downloads directory to start the installation.
4. Select "Legacy password encryption" to avoid trouble using the new password encryption method.
5. Set the root password to "DontTellAnyOne", and follow instructions to finish.
6. Verify the MySQL server daemon with the "ps" command:
herong$ ps -ef | grep mysqld 74 94827 1 0 9:35PM 0:01.73 /usr/local/mysql/bin/mysqld \ --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data \ --plugin-dir=/usr/local/mysql/lib/plugin --user=_mysql \ --log-error=/usr/local/mysql/data/mysqld.local.err \ --pid-file=/usr/local/mysql/data/mysqld.local.pid \ --keyring-file-data=/usr/local/mysql/keyring/keyring \ --early-plugin-load=keyring_file=keyring_file.so \ --default_authentication_plugin=mysql_native_password
7. Connect to the MySQL server with the "mysql" client program:
herong$ /usr/local/mysql/bin/mysql -u root -p Enter password: DontTellAnyOne mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.00 sec)
The next step is to add "/usr/local/mysql/bin/" to the environment PATH variable to void typing the path name when invoking MySQL commands.
Table of Contents
JDBC (Java Database Connectivity) Introduction
Installing and Running Java DB - Derby
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
Creating Database and User with MySQL Monitor
MySQL JDBC Driver (MySQL Connector/J)
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 - Reference Implementation of JdbcRowSet
Oracle - JBDC CallableStatement
Oracle CLOB (Character Large Object) - TEXT
Oracle BLOB (Binary Large Object) - BLOB
Microsoft SQL Server Express Edition
Microsoft JDBC Driver for SQL Server
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