Difference between revisions of "MySQL"

From Commander4j Wiki
Jump to: navigation, search
(Created page with "Installing mySQL is not difficult, but can be tedious and time consuming depending on the version of Windows you are running and how many of the pre-requisites you have alread...")
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
Installing mySQL is not difficult, but can be tedious and time consuming depending on the version of Windows you are running and how many of the pre-requisites you have already got installed. The following instructions will go through the installation of mySQL Server and mySQL Workbench and include all the potential supporting installs like .NET Framework.
+
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.
  
The 1st step is to download the software. I am demonstrating here using a Windows installation on Server 2003. The files that I have downloaded are the mySQL server software and the Workbench<br>
+
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.
  
 +
[https://dev.mysql.com/doc/refman/8.0/en/installing.html mySQL Documentation on Installation can be found here]
  
<br><br>[[File:mysql_win_files.jpg]]<br><br>
+
A quick list of steps should be a follows :-
  
The 1st step is to install the mySQL server software.
+
Download and Install mySQL server.
 +
Download and Install mySQL Workbench.
  
<br><br>[[File:mysql_win_setup1.jpg]]<br><br>
+
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.
The mySQL welcome screen should appear initially, click on next to continue.
+
  
<br><br>[[File:mysql_win_setup2.jpg]]<br><br>
+
Say for example "commander4j_live" and "commander4j_demo"
Read and agree to the license agreement (if you want to continue).
+
  
<br><br>[[File:mysql_win_setup3.jpg]]<br><br>
+
Next you will need to create 2 users, one for each of the above schema's.
For this example I have selected the "Typical" installation.
+
  
<br><br>[[File:mysql_win_setup4.jpg]]<br><br>
+
Lets say we create a user 'c4j_user_live' and 'c4j_user_demo'
Click on the "Install button.
+
  
<br><br>[[File:mysql_win_setup5.jpg]]<br><br>
+
You can create the users within mySQL Workbench as well.
The install should copy the required files now.
+
  
<br><br>[[File:mysql_win_setup6.jpg]]<br><br>
+
It's important to note at this point that the way mySQL works at this point is a little different to other database products.
Once it has completed click on the Next button.
+
  
<br><br>[[File:mysql_win_setup7.jpg]]<br><br>
+
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.
Click on Next again.
+
  
<br><br>[[File:mysql_win_setup8.jpg]]<br><br>
+
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.
Now click on Finish.
+
  
<br><br>[[File:mysql_win_setup9.jpg]]<br><br>
+
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.
The installer will now load the configuration program, click next.
+
 
+
<br><br>[[File:mysql_win_setup10.jpg]]<br><br>
+
Select "Standard" Configuration an click Next...
+
 
+
<br><br>[[File:mysql_win_setup11.jpg]]<br><br>
+
Select the options as show above and click Next...
+
 
+
<br><br>[[File:mysql_win_setup12.jpg]]<br><br>
+
Select a password for the "root" user account. I find it more convenient to also allow remote access for the root user, but this is not mandatory. Click Next to apply the settings..
+
 
+
<br><br>[[File:mysql_win_setup13.jpg]]<br><br>
+
The program will then configure the service...
+
 
+
 
+
<br><br>[[File:mysql_win_setup14.jpg]]<br><br>
+
Once the settings have been applied you can click Finish with will close the program.
+
 
+
You have now installed mySQL - however you still need to create a user account and schema for Commander4j to use. You can do this using mySQL command line tools, but I find the mySQL Workbench utility a handy tool to have and easier to use if your not familiar with mySQL. Unfortunately the WorkBench program can be a little temperamental to install. For instructions on how to install [[mySQL Workbench]] click on this link.
+
 
+
Once you have installed mySQL Workbench by following the link above you are ready to create a database user for the application to run against. Make sure the Workbench is loaded and perform the following steps<br><br>
+
 
+
[[File:mysql_config1.jpg]]<br><br>
+
 
+
[[File:mysql_config2.jpg]]<br><br>
+
 
+
[[File:mysql_config3.jpg]]<br><br>
+
 
+
[[File:mysql_config4.jpg]]<br><br>
+
 
+
[[File:mysql_config5.jpg]]<br><br>
+
 
+
[[File:mysql_config6.jpg]]<br><br>
+
 
+
[[File:mysql_config7.jpg]]<br><br>
+
 
+
[[File:mysql_config8.jpg]]<br><br>
+
 
+
[[File:mysql_config9.jpg]]<br><br>
+
 
+
[[File:mysql_config10.jpg]]<br><br>
+
 
+
[[File:mysql_config11.jpg]]<br><br>
+
 
+
[[File:mysql_config12.jpg]]<br><br>
+
 
+
[[File:mysql_config13.jpg]]<br><br>
+
 
+
[[File:mysql_config14.jpg]]<br><br>
+
 
+
[[File:mysql_config15.jpg]]<br><br>
+
 
+
[[File:mysql_config16.jpg]]<br><br>
+
 
+
[[File:mysql_config17.jpg]]<br><br>
+
 
+
[[File:mysql_config18.jpg]]<br><br>
+
 
+
[[File:mysql_config19.jpg]]<br><br>
+
 
+
[[File:mysql_config20.jpg]]<br><br>
+
 
+
[[File:mysql_config21.jpg]]<br><br>
+

Latest revision as of 04:27, 16 December 2023

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.