Saturday, 8 August 2015

Install MySQL

I also find myself needing to install MySQL 5.6.25 as well for my classes. Step by step how to install...

1. Visit mysql's website and obtain a copy of mysql-5.6.25-winx64.zip (standalone zip file, NOT the installer).

2. Extract it to the desired drive. In my case this is drive G. Rename to mysql.
3. Create an option file with the following contents and save it to G:/mysql/my.ini
[mysqld]

# basedir to installation path
basedir=G:/mysql

# location of data directory
datadir=G:/mydb/data

4. Ensure both the basedir and the datadir exist, creating them if necessary.
5. Copy the contents of directory G:/mysql/data/ to G:/mydb/data/. This gets you an empty database. (if you don't follow this step you will get an error [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist)

6. Start mysql
cd /d G:
mysql\bin\mysqld --console


Output should end with:
2015-06-13 16:56:04 1388 [Note] mysql\bin\mysqld: ready for connections.
Version: '5.6.25'  socket: ''  port: 3306  MySQL Community Server (GPL)


7. Open a new command prompt and login to the database
G:\>mysql\bin\mysql --user=root
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
+--------------------+
2 rows in set (0.00 sec)

If you see database "mysql" all is well.

Now you can do whatever you need to with the new database, or create another database/schema if you wish.

JAI Tutorials

Found links to some JAI examples since the top links on Oracle's site return 404 not found errors on the actual tutorials. Turns out that the tutorials/demos were migrated over to java.net under jai-demos and jaistuff projects.

Links are:
https://java.net/projects/jai-demos
https://java.net/projects/jaistuff

You can browse the code through these projects or download the source through SVN.

The source compiles through ant (there is a readme with instructions on how to compile the examples) or you can pull it into your favorite IDE, add the JAI libraries to the classpath, and run from there.

More useful links to JAI related code are here: http://www.silverbaytech.com/2014/05/16/java-advanced-imaging-downloads/