mysql guru user guide · mysql guru user guide 1. loading the application in order to use the...

23
MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command Line Execution The default route in which to execute the application on any platform involves command line execution. Firstly, you will require a terminal window in which to execute the command. If using the Windows platform, click on the run option in the start menu and type in cmd.exe followed by the run button. On any other platform, load the default terminal window. Navigate to the directory of where the application is installed using the change directory command. e.g. cd /users/glenadams/applications Here we can see that I have changed the location of the terminal window to be in the applications folder. Next, in order to execute the application the following command will need to be executed: java –jar MySQLGuru.jar The application will then be loaded. 1.2. Jar-Loader Execution Depending on the platform used, it is sometimes possible to load the application by simply using a double click approach on the application icon. Once the icon has been clicked, the application will be loaded using the systems jar file launcher. 2. Menu Navigation 2.1. Navigating To Features The application features have been segmented into several menus. Each feature can be navigated to via two routes. The first route is via the menu-bar, and the second is via a series of toolbars using graphical buttons.

Upload: others

Post on 06-Aug-2020

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

MySQL Guru User Guide

1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed.

1.1. Command Line Execution The default route in which to execute the application on any platform involves command line execution. Firstly, you will require a terminal window in which to execute the command. If using the Windows platform, click on the run option in the start menu and type in cmd.exe followed by the run button. On any other platform, load the default terminal window. Navigate to the directory of where the application is installed using the change directory command. e.g.

cd /users/glenadams/applications Here we can see that I have changed the location of the terminal window to be in the applications folder. Next, in order to execute the application the following command will need to be executed: java –jar MySQLGuru.jar The application will then be loaded.

1.2. Jar-Loader Execution Depending on the platform used, it is sometimes possible to load the application by simply using a double click approach on the application icon. Once the icon has been clicked, the application will be loaded using the systems jar file launcher.

2. Menu Navigation

2.1. Navigating To Features The application features have been segmented into several menus. Each feature can be navigated to via two routes. The first route is via the menu-bar, and the second is via a series of toolbars using graphical buttons.

Page 2: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

The following is a list of where each feature lies in relation to the segmented menus. Connection - Connection Manager - Save Connection - Edit Saved Connection - View Connection Settings Database - View Databases - Add Database - Delete Database Table - View Tables - Add Table - Delete Table - Edit Table Query - Query Manager - Modify Table Content Preferences - Preferences Help - About - Contact Us - User Guide In order to navigate between the menu’s using the toolbar you need to click on the relevant icon to load the sub toolbar, which allows access to each of the features in the relevant menu.

Figure 0 Application Toolbar

3. Server Connection

3.1. Connecting To A Server On loading the application you will see that the connections menu is the default screen to be shown.

Page 3: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 1 Connections Menu

Clicking on the ‘Connection Manager’ icon will load the connection manager. This manager allows the user to be able to manage the connection to be used with the application.

Figure 2 The Connection Manager

The basic connection details required in order to make a valid connection include the server location, username and password. On entering these core details, a user will be

Page 4: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

permitted to either test the connection or continue to make a full connection. Using the drop-down list at the top of the form allows the user to select a saved connection from the connections file. If the user selects one of these connections, the details will be loaded into the form below. The ‘Test Connection’ feature allows the user to verify if the connection is viable. On selecting this option, a dialog will appear stating whether or not the test connection was successful or not. Alternatively, a user may wish to continue with the connection without testing to see if it is viable first. To do this, the connect button should be selected. If the connection is valid, the user will be alerted with a “Connection Made” message. However, if there was an error during the connection process, an error message will be displayed stating the exact cause of the connection problem.

Figure 3 Connected Connection Manager

On a successful connection, the connect button will be changes to become a disconnect button. You may now close the connection manager and continue to use the application. On closing the connection manager window, the connection model located on the left of the main application window will be populated with a tree showing the contents of the connection. Using this model allows the user to traverse through the connection model to view the name of the databases available to the user and their respective tables.

Page 5: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 4 The Connection Model

3.2. Saving The Current Connection To save the current connection, a valid connection must be made. Once there is a valid connection. Navigate to the connections menu (see figure 1) and click on the ‘Save Connection’ icon. You will then be presented with a dialog asking for a connection name.

Figure 6 Save Connection

After entering a connection name, click on the ‘OK’ button to continue. If the connection were unable to be saved, an error message will be appeared and the connection not saved to the connections file.

Page 6: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

3.3. Editing The Saved Connections To edit the saved connections stored in the connections file, navigate to the connections menu (see figure 1) and click on the ‘Edit Saved Connections’ button. On clicking on this icon, a new window will be displayed allowing for the connections to be modified.

Figure 7 Edit Saved Connections

Firstly choose the connection name that you wish to modify in the drop-down list. After selecting the connection, load it using the load button. On loading the connection, the connection details will appear in the connections form. You now have the choice of whether to modify or delete the connection from the connections file. In order to modify the connection, simply alter the details in the form and then click on the ‘Modify’ button. Similarly to delete the connection, click on the ‘Remove’ button. On completion of a successful modification, you will be presented with a message stating that the modification was successful.

3.4. View Connection Settings In order to view the current connection settings, naturally a valid connection will need to be present. To view the current connection details, go into the connection menu (see figure 1) and click on the ‘View Connection Settings’ button. A window will then open showing the current connection settings.

Page 7: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 8 View Connection Settings

4. Database Features Note that if when connecting to the server, you have specified a specific database to connect to, the following features will only show that connected database.

4.1. View Databases To view the current databases available to the user using the current connection, navigate to the database menu.

Figure 9 Database Menu

Page 8: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Then click on the view databases icon. This will open a new window showing a model of all the databases currently accessible by the user using the current connection.

Figure 10 View Databases

4.2. Add A Database To add a new database to the current server connection you must have the correct user permissions on the server to be able to create a new database. If you do not have the correct permissions, you should ask the server administrator for assistance. Navigate to the database menu (see figure 9), and then click on the ‘Add Database’ button. You will then be presented with a dialog box asking you to input the name of the database to add to the server.

Figure 11 Add New Database

Once you have entered a name, add the database by clicking on the ‘Add’ button. If there was an error adding the new database to the server, you will be presented with an error message. Otherwise, the new database will be created on the server.

Page 9: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

4.3. Delete Databases To delete a database from the current server connection, you must have the correct user permissions on the server to be able to delete the database. If you do not have the correct permissions, you should ask the server administrator for assistance. Navigate to the database menu (see figure 9), and then click on the ‘Delete Database’ button. You will then be presented with a dialog box asking you to select the name of the database that you wish to delete from the server.

Figure 12 Delete Database

Once you have selected the name of the database to delete, click on the ‘Delete’ button. If there was an error deleting the database, there will be an error message presented. Otherwise, the database and its contents will be permanently deleted from the server.

5. Table Features Note that if when connecting to the server, you have specified a specific database to connect to, the following features will only allow you to use tables from that specified database.

5.1. View Table Structure To view a table’s structure, first navigate to the table menu and click on the ‘View Table’ icon.

Page 10: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 13 Table Menu

After clicking on the ‘View Tables’ button, you will be presented with a viewing window.

Figure 14 View Table Structure

Select the database of which you wish to select a table from. Then select a table from the list of tables and click on the ‘Load’ button. When clicking on this button, a table will be created showing the structure of the table.

Page 11: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

5.2. Add Table To add a new table to a database on the current server connection you must have the correct user permissions on the server to be able to create a new table. If you do not have the correct permissions, you should ask the server administrator for assistance. Navigate to the table menu (see figure 13), and then click on the ‘Add Table’ button. You will then be presented with a new window allowing you to enter the relevant details for the new table.

Figure 15 Add Table

Firstly, select a database that the new table should be added to using the drop-down list. Next enter the new table name that you wish to create. Initially, there is already one field in the table structure definition, although all of this is left blank. After entering the details into the row you can add another field to the table structure by clicking on the ‘Add Field’ button, another empty row will be added to the table. If during the definition of the structure you wish to remove a column from the table, select the row to delete and then click on the ‘Remove Field’ button. Once you are happy with the definition of the new table, click on the ‘Create’ button. If there has been an error in the creation of the table, an error message will be displayed and the table will not be added to the database.

5.3. Delete Table To delete a table from a database on the current server connection, you must have the correct user permissions on the server to be able to delete the table from the database. If you do not have the correct permissions, you should ask the server administrator for assistance.

Page 12: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Navigate to the table menu (see figure 13), and then click on the ‘Delete Table’ button. You will then be presented with a dialog box asking you to select the database and relevant table that you wish to delete.

Figure 16 Delete Table

Once you have selected a table to delete, click on the ‘Delete’ button. If there has not been an error during the deletion, the table and its contents will be permanently removed from the database. However, if there was an error during the deletion, an error message will be displayed in a dialog box stating the cause of the problem and the table will not be removed.

5.4. Edit Table To edit a table in a database on the current server connection, you must have the correct user permissions on the server to be able to edit the table from the database. If you do not have the correct permissions, you should ask the server administrator for assistance. Navigate to the table menu (see figure 13), and then click on the ‘Edit Table’ button. You will then be presented with a window, which allows you to load a table to edit and modify the table using the optional features provided. In the edit table menu (see figure 17) load a database and relevant table to use by selecting the relevant details and clicking on the load button.

Page 13: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 17 Edit Table Menu

5.4.1. Add New Column Click on the ‘Add New Column’ button. You will be presented with a new window that allows for a new column to be added to the loaded table.

Figure 18 Add New Column

Enter the details to be used for the new column into the form provided. Selecting the ‘Create Column’ button will create a new column using the details provided in the selected table. 5.4.2. Edit Column Click on the ‘Edit Column’ button. You will be presented with a new window that allows you to select a column in the table and edit it.

Page 14: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 19 Edit Column

Select the column name that you wish to edit, next enter the details into the rest of the form to modify the column to. Once finished, click on the ‘Modify Column’ button. The selected column in the table will be modified once you have confirmed the action to take. 5.4.3. Delete Column Click on the ‘Delete Column’ button. You will be presented with a new window that allows you to select a column in the table to be removed.

Figure 20 Remove Column

Select a column to be removed from the table using the drop-down list and then click on the ‘Remove Column’ button to permanently remove the column from the table model. Note that any data held within the column will be lost. 5.4.4. Add Primary Key Click on the ‘Add Primary Key’ button. A window will then be opened allowing you to select a column to be used as the table’s primary key.

Figure 21 Add Primary Key

Page 15: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Select a column to be used and click on the ‘Apply Primary Key’ button. Note that if a primary key already exists in the table, it must first be deleted before another can be applied. 5.4.5. Delete Primary Key Click on the ‘Delete Primary Key’ button. A confirmation dialog will ask you to confirm the action. On continuing, the primary key reference applied to the table will be removed.

Figure 22 Remove Primary Key

5.4.6. Edit Default Value Click on the ‘Edit Default Value’ button. A new window will be presented allowing you to edit a default value for a specified column in the table.

Figure 23 Edit Default Value

Select the column that you wish to use from the drop-down list and then enter a valid default value in the text box provided. Once finished, click on the ‘Modify Default Value’ button to save the default value for the column. 5.4.7. Delete Default Value Click on the ‘Delete Default Value’ button. A new window will be presented allowing you to remove a default value for a specified column in the table.

Page 16: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 24 Remove Default Value

Select a column to remove using the drop-down menu and click on the ‘Remove Default’ button. The default value for the selected column will then be removed. 5.4.8. Sort Table Click on the ‘Sort Table’ button, a new window will be opened allowing the user to select how the table data should be ordered.

Figure 25 Sort Table

Select a column and order in which the table data should be ordered by. Then click on the ‘Sort Table’ button to order the contents. 5.4.9. Rename Table Click on the ‘Rename Table’ button, a dialog will appear asking you to enter a new table name to be applied.

Figure 26 Rename Table

Once you have entered a new table name, click on the ‘Rename Table’ to apply the name change.

Page 17: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

6. Query Features

6.1. Query Manager To execute a query against the database, firstly navigate to the query menu in the main application and click on the ‘Query Manager’ icon.

Figure 27 Query Menu

After clicking on the ’Query Manager’ button, you will be presented with a new window for executing queries.

Page 18: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 28 Query Manager

Select a database and table to be used in the query using the drop-down lists at the top of the manager and click on the ‘load’ button. Enter the query statement that you wish to execute into the query text area at the bottom of the manager and click on the ‘Execute’ button. If the statement is not erroneous another window will be opened with the results of the executed query.

Figure 29 Query Manager Results

Page 19: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Clicking on the ‘print’ button will load the systems printing manager allowing you to print the results of the query.

6.2. Modify Table Data Navigate to the query menu in the main application as seen in figure 27. Then click on the ‘Modify Table Content’ button. Once the icon has been clicked, a new window will be loaded allowing the user to modify the contents of the table.

Figure 30 Modify Table Content

Select a database and table to be used in the modification using the drop-down lists at the top of the manager and click on the ‘load’ button. Enter the modification statement that you wish to execute into the statement text area at the bottom of the manager and click on the ‘Execute’ button. If the statement is not erroneous a dialog will appear stating that the modification was successful. You may view the contents of the loaded table by clicking on the ‘View Table Contents’ button. Once selected, a new window will open showing the contents of selected table.

Page 20: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 31 View Table Contents

You may print the results shown in the window by clicking on the ‘print’ button, which will load the systems printing manager allowing you to produce a hard copy of the data.

7. Application Preferences

7.1. Saved Connections File Location Navigate to the preferences menu in the application menu and click on the ‘Preferences’ icon.

Page 21: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 32 Preferences Menu

Once the icon has been pressed, a new window will appear allowing for the location of the saved connections file to be modified.

Figure 33 Preferences Window

The location of the default file is presented initially if it has not been modified since the application has been run. Enter the location and name of the newly desired connections file and click on the ‘save’ button to save the changes.

8. Help Features

8.1. About

Page 22: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Navigate to the help menu in the application and click on the ‘About MySQL Guru’ icon.

Figure 34 Help Menu

After clicking on the about icon, a dialog will appear with information about the application.

Figure 35 About Dialog

8.2. Contact Us Navigate to the help menu in the main application as seen in figure 34. Then click on the ‘Contact Us’ icon. Once the icon has been selected a new dialog window will appear with the details to contact the developer of the application.

Page 23: MySQL Guru User Guide · MySQL Guru User Guide 1. Loading The application In order to use the application, Java version 1.5 (commonly known as Java 5.0) must be installed. 1.1. Command

Figure 36 Contact Us

8.3. User Manual In order to load this application user manual, navigate to the help menu (see figure 34) and click on the ‘User Guide’ icon. Depending on the platform of which the application is running on, the default web-browser will open and load the address of where the application user guide is available.

9. System Requirements The application requires the following system requirements. • Operating System:

• Microsoft Windows XP (not tested on Windows 98 or Vista) • Apple Macintosh OS X 10 onwards • Linux • Unix

• JDK (Java Development Kit) 1.5 – commonly known as Java 5

• Web Browser:

• Internet Explorer • Firefox • Safari • Camino