The config file (config.ini) is responsible for processing. This is where the mySQL database, userid, password, table names, output directory and other values are stored so the rest of the system processes data correctly.
This process is used in updating, creating new SQL regions, and to create the database and tables in an existing mySQL environment. Regardless, your userid and password must already exist before you can change and use them.

CONFIG FILE: Required Fields
There are 6 mandatory fields (as shown above) that are required for the system to work.
They are:
| SQL DATABASE: | This is where your Baseball/Softball statistical tables are stored. |
| SQL USER: | This is the userid that is used to log into mySQL and process commands. |
| SQL PASSWORD: | The password for the mySQL USER. |
| SQL BATTING TABLE: | This is where all the batting and fielding stats are stored. |
| SQL PITCHING TABLE: | All pitching statistics are stored here. |
| SQL OUTPUT DIRECTORY: | This is the location that mySQL stores ASCII/Text files it either creates or reads as
input. The program defaults it to mySQL's default value (/var/lib/mysql-files/).
Unless you changed this location within mySQL, you can leave this value as-is.
*** NOTE: Please read the mySQL documentation, as access (privileges) may not be set properly for you to use it. See how to set "--secure-file-priv option" *** |
| INNINGS: | The length of a normal games. baseball is usually 9, softball is 7, Little League are 6 or 7 innings. |
For each field the current value set is wrapped in (). For example, the current SQL DATABASE is baseballTDB as shown above.
CONFIG FILE: Update
If this is not the first time that you are running this application, the screen you get is an UPDATE screen (as shown by the button labeled [UPDATE]. If you put something in the input box next to any or all of the labels, the application will change these values in config.ini only. The application will not verify that the values you put in are valid until you try to display or update any table.
This has been done on purpose, as you will need to set up your environment ahead of time. When you first install mySQL, it will ask you to set up your userids and passwords other than root.
So for the UPDATE function, it is up to each user to make sure that they have created their userid, password, database and tables ahead of time, using the provided SQL file, before running update. This does not apply when either running the application for the first time, or setting up a new SQL Region. In both those cases, The application will set up the database and tables for you. Your userid and password must already exist, or those processes will fail.

CONFIG FILE: Install/Create New Region
If you want to create a new table(s) or a new database, this is the option you will choose. The screen above will provide you with a blank slate, as it is also used when you first run the application. The values defaulted are "*** PLEASE UPDATE ***" for each field, as it assumes you will be setting up a new environment.

When selecting this option, it will erase the current config.ini file (if it exists) and overlay it with default values of "*** PLEASE UPDATE ***". The box above will appear asking you if you are sure you wish to continue. Clicking the [NO] button will abort the process. [YES] will go ahead and re-initialize the config.ini file for you to provide new values. ALL OLD VALUES WILL BE LOST! This not only resets the config.ini file, but will execute a SQL procedure file to create new database and tables if they do not exist. It is strongly suggested that if you are processing for different leagues with different values (like innings), write down/remember the old values so you can go back to it when needed. A future release may address this issue.

The above shows all fields filled in, and the button [CREATE] is your option. This means that you are creating a brand new environment, and the application will create a new database, if it does not exist, but will delete any table with the names provided, if they exist, and create empty tables.
If you set, say the database to one already established, and provide new table names, the application will just create new tables, and not recreate your database. The SQL does a "CREATE DATABASE IF NOT EXISTS" so it will not erase any data that you have. Same goes for the table names. For example, if you just want to create a new pitching table, the INSTALL feature will do just that. It will leave your database and batting table alone.
Notice I did not change the SQL OUTPUT DIRECTORY. That is because mySQL defaults it to "/var/lib/mysql-files/". So again, unless you changed this location within mySQL, you can leave this value as-is.
Below are a before and after showing an update to the DATABASE and INNINGS fields. The others are not changed. Neither the DATABASE nor the INNINGS fields are verified, and the changes will be applied to the Config File.


Remember, if the button says [CREATE], then you are creating a new database and/or tables. To create a new database or tables, you must run "Create New Region" to actually execute the SQL creates. If the screen shows the [UPDATE] button, then you are only updating the config.ini file, and you are just changing the names of your database and/or tables. The database and/or tables must already exist, or the application will not work. There is no verification process to ensure this.