Every session of every user generates data - shopping carts, credit cards, form fill-ups, messages, sales, etc.
All this data is typically saved into a relational database - typically with JDBC (Java Database Connectivity API) or Hibernate (an ORM solution).
We will learn how to do database persistence.
We will use one of the most popular open source database - MySQL.
Please install MySQL and get the service started. MySQL provides an installer which does everything - just follow the default settings on the wizard.
Make sure to remember/write-down the admin password that you will specify in the installation wizard - if you forget, it is a hell of a lot of trouble to uninstall/reinstall!
Note that MySQL comes in cluster mode as well. I had a hard time getting the cluster installer to work correctly, so I recommend installing the regular MySQL.
After you are done installing, you should be able to start the MySQL command line client.
Type the "show databases;" command at the mysql prompt.
If you see the default databases, you are good to go.
Enter password: *********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.2-m2-community MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql>
No comments:
Post a Comment