MySQL

From Commander4j Wiki
Jump to: navigation, search

MySQL is a relatively simple database to install and has the advantage that it's available on multiple platforms, such as Windows, Mac OS X, Linux etc. The method for installing mySQL on each platform is different but there is a significant amount of information on the internet to help you.

I recommend that in addition to installing the database itself you also install something called mySQL Workbench as this tool will let you create a schema and users if your are not familiar or keen on using the command line interface.

mySQL Documentation on Installation can be found here

A quick list of steps should be a follows :-

Download and Install mySQL server. Download and Install mySQL Workbench.

Using mySQL Workbench create a schema for your commander data. You can choose whatever name you want but it might be helpful to create 2 schemas, one for testing and experimenting and one for live production use.

Say for example "commander4j_live" and "commander4j_demo"

Next you will need to create 2 users, one for each of the above schema's.

Lets say we create a user 'c4j_user_live' and 'c4j_user_demo'

You can create the users within mySQL Workbench as well.

It's important to note at this point that the way mySQL works at this point is a little different to other database products.

When you add a new user you have specify the hosts which are allowed to connect to the database. In effect you will most probably need to add the same username more than once in order to permit connections from different places.

Select the required permissions for the new user and make sure you grant it rights to your newly created schema. For example in the screen below the username and schema name are the same. Using the example names above you would add schema permissions for commander4j_live database to the user c4j_user_live and so on.

Once you have created the database and a user with permissions to create tables, views, functions etc then you will need to use the Setup4j utility to create the schema.