Tuesday, July 24, 2012

MySQL stuff

Today I went through the process how to setup MySQL environment.

(1) Before installing the new version of MySQL, you'd better remove the existed MySQL server from your mac. The following post is useful:
http://tomkeur.net/39/how-to-remove-mysql-completely-mac-os-x-leopard.html

(2) Install MySQL.
You can download MySQL from http://dev.mysql.com/downloads/mysql/
Remember to choose the .dmg file. The installation process is written below: http://dev.mysql.com/doc/refman/5.6/en/macosx-installation-notes.html

(3) Running MySQL
Before typing "mysql" in the terminal, you gotta start MySQL server first. The easiest way is to click the icon from Mac's "system preference panel". Of course, you have to install panel in .dmg file.

(4) GUI for MySQL.
The inconvenience of MySQL is it doesn't include graphical user interface. Thus, in order to ease the development, we always install some GUI plugin for communicating with MySQL. I tried Navicat and it works well. You can find other GUI for MySQL from
http://wenku.baidu.com/view/0205833283c4bb4cf7ecd1a8.html

(5) Connect MySQL using JDBC
It is very easy. First you need to download the mysql-connector-java-version.jar, then import it into the java project. It is easy to find some tutorials talking JDBC. Below is one tutorial:
http://www.roseindia.net/jdbc/jdbc-mysql/

No comments:

Post a Comment