MySQL

Copyright 1997-2007 Mekashron.

 

 

  1. What is MySQL?

    MySQL LogoMySQL is a user-space Relational Database Management System, or in the short form, RDBMS. SQL is pronounced as each of the letters in the word, separately. Therfore, S-Q-L. An RDBMS is a program that facilitates access to various databbases on a remote or a client machine. A database itself is a collection of files and folders (although not necessarily always) which contains information that is entered by users. The front-end of a database is widely known as a table. A table itslef contains the processed information that the user has entered into the databse.

    MySQL is maintained by a non-profit firm in Sweden, called MySQL AB. MySQL, unlike many other competitors in the scene, is known as a free-software although it is not entirely free! The aforementioned company holds the right to maintain most of the codebase for this software and gives various licenses to people around the world for using this software. This is in comparison to Microsoft's SQL Server which requires users to pay for a license. Many software use MySQL as their back-end database manager. This is done through MySQL's API. The software communicates with MySQL and MySQL stores or retrievies information according to the software's needs.

    As a conclusion, MySQL could serve as a very good back-end RDBMS for a software that requires seeking in and retrieving information from a datab-base. Our software, Mekashron Business, is no exception to this.



  2. What is HeidiSQL?

    HeidiSQL LogoHeidiSQL, formly known as MySQL-Front, is an open-source project maintained by a German programmer called Ansgar Becker. HeidiSQL is a free front-end for MySQL. Front-end applications are those that provide users with more easy-to-use commands and communicate with another software in the background, through that software's API (Application Programming Interface). The program is developed in Delphi (a programming language with Pascal as its ancestor and an integrated development environment IDE).

    HeidiSQL is the software that we would recommend to our users to have direct access to our Business software's database. Using HeidiSQL, you will be able to gain access, through an intuitive GUI, to the MySQL database that Mekashron Business software uses.

    HeidiSQL is not an alternative to MySQL and as stated above, is a front-end for the aforementioned RDBMS. HeidiSQL runs only on Microsoft Windows. However, there are some advantages in using HeidiSQL such as the fact that this program comes with a GUI (Graphical User Interface) that allows the user to interact with the program even more easily. MySQL features a command-prompt-driven engine that requires the user to enter commands and switches manually into the command-prompt-window, formly known as the DOS Box!

    To make a conclusion, the use of HeidiSQL is recommended for users and/or companies that require less time to be put into working with MySQL at the command-prompt level. HeidiSQL easily brings the power of MySQL through an intuitive Graphical User Interface. HeidiSQL can be downloaded from SourceForge.



  3. Mekashron Business Software and MySQL?


    Mekashron Business installing MySQL in C:\The Mekashron Business software, a product by Mekashron, uses MySQL as its back-end RDBMS, as stated above. This software that runs on a Microsoft Windows machine, installs the MySQL RDBMS automatically for its users' convenience. The MySQL will automatically be installed in a directory called MySQL in the "C:\" partition. This is depicted to the left! The MySQL folder contains 4 folders and a single file in its root directory. One of these folders is called "bin" as in "binary". Most applications now, due to convenience and tradition mostly, have a folder called "bin" to store their binary formatted executable files. An executable file is a program that a user can run and interact with.

    The "bin" folder in "C:\MySQL\" contains various executable files (PE files or Portable Executale; Windows' executable files) each of which does a completely different job. For example, one of the executable files included in this directory is called "mysqlc.exe" that is the Client side of the MySQL RDBMS. A Client program, in computer science, is a program that uses a server as its source of information.

    As a conclusion, the Mekashron Business software, since it uses MySQL as its RDBMS, installs this RDBMS on your machine automatically for the sake of convenience. Therefore, the Mekashron Business software could be thought of as an stand-alone software that does not require its user to download or purchase various components to be able to use this software.

    After the installation of Mekashron Business software on your computer, you will be able to find a file called "winmysqladmin.exe" or in brief "winmysqladmin" in the "bin" directory of the MySQL folder. This file will eventually be located in "C:\MySQL\bin\winmysqladmin.exe". By executing this file, you will allow a service called "Administrator" to be installed as a service on your computer. This is the service that allows MySQL to accept requests over the network and respond to them.



  4. What if I already have MySQL Installed?

    By reading the above text, you must have realized that the Mekashron Business software uses MySQL as its backbone and RDBMS. It is already stated above that our software attempts to install a fresh copy of MySQL on your computer. It must also be noted that the installation of MySQL in the setup process of our software is mandatory. Therefore, you must understand what you can do in order to let your existing installation of MySQL coexist with our program's installation of MySQL. This section of the text helps you overcome this problem.

    MySQL has its default installation folder in "Program Files" in your Windows' installation folder. For example "C:\Program Files\MySQL\MySQL Server 5.0". This is in contrast to the default installation folder of MySQL that is shipped with Mekashron Business software. However, when you install our software successfully on your local computer and you are attempting to establish the server connection, you will be presented with an error message such as the one shown below:

    Mekashron Error #1

    The defauly settings of the MySQL setup that is shipped with our software uses the user-name of "root" and a blank password. However, in case you have your own version of MySQL installed previous to the installation of our software, this might not work for you. In fact, our software will not replace your MySQL installation with its own. What happens is that you will still have your own MySQL setup installed and our software will only install a fresh copy of MySQL. Therefore, in order to allow our software to connect to your own installation of MySQL, you will have to click on the Show Database Options check-box in the Login window of Mekashron Business software and put in the correct username and password in your own MySQL installation. For example, if your username is "root" and your password is "123456" without the quotation marks, you can prove this username and password in the Login window and hit the Login button.

    However, before we forget, the reason our software installs a fresh copy of MySQL is that it will also include all the data files our software requires. Without these data files, you are not going to be able to run our software. Therefore, once you have put the correct username and password in the Login window, you will be given the below error message if you merely attempt to login to the program:

    Error Window #2

    The above error message explicitly and informatively explains the reason why you are not able to log into the system and the reason is that the data-files, as explained above, for our software are not present in your installation of MySQL. The question is "Where can I find the data files for the Mekashron Business software?". You can simlply navigate to the "C:\MySQL\data" folder. There, you will see two folders namely "MekashronBusiness" and "mysql" where the former is contains data-files for our software and the latter is the default MySQL's database. What we have to do is to follow the below steps.

    1. Move over to the "MekashronBusiness" folder and press CTRL+C keys simultaneously. If you are not comfortable with the keyboard or you would rather use the Mouse, please, right click on the aforementioned directory and choose the Copy menu-item.
    2. Change your explorer's address to your own MySQL's default installation folder. For example, to "C:\Program Files\MySQL\".
    3. Once in your defauly MySQL's installation folder, navigate to the "data" folder.
    4. If you like to use the keyboard, press CTRL+V to paste the "data" folder copied from "C:\MySQL". If you like using your Mouse device, right click on a white-space in your MySQL's "data" folder and choose Paste from the menu-items. This should copy the "MekashronBusiness" folder and all of its contents from "C:\MySQL\data" to the new "data" folder. This is depicted below:

      New Data Folder

    You can now click on the Login button in the Login window of the Mekashron Business window, using your MySQL username and password, in order to connect. At this time, you must be presented with the main and entry window of our software as shown below.

    Mekashron Window




  5. What if I want to move MySQL from one machine to another or from one folder to another?

    This section of our manual explains how you can move the MySQL folder that is shipped with Mekashron Business, If you have installed your own setup of MySQL, you can run the administration tools in your MySQL's "bin" directory to change the location of the server. This chapter will only explain how you can move our version of MySQL to another computer.

    Please follow the below steps in order to be able to move your Mekashron Business' MySQL installation to another machine:


    From one folder to another:

    1. First make sure that the MySQL service is stopped. In order to do this, locate the Traffic Light icon in your task bar.
    2. Right click on the Traffic Light icon in your task bar and choose the Win NT menu item.
    3. Choose the Stop The Service menu item. You will now be presented with a message box such as that shown below:



    4. In the above message box, click on Yes. At this moment, the Traffic Light should indicate orange immediately followed by the light changed to red.
    5. Follow Steps 1 to two again but this time, instead of Step 3 clicking on Stop The Service, click on the Shutdown This Tool menu item. At this time you must be given a window such as that shown below:



    6. In the above dialog, click on Yes. The above steps were carried out because you are not going to be able to move a folder and its contents while some of its files are being used. Therefore, you must make sure none of the files in that folder are being executed and/or used.
    7. Please NOTE that: although the traffic light might not be shown in the task-bar, the MySQL service might already be running in the back-ground. Therefore, it is beneficial, in order to make sure that the folder is not being used, just to go Start Menu, then Run and type "NET STOP MySQL" without the quotation marks and hit the Enter key.
    8. At this step, you must open your browser and point it to the "C:\" partition.
    9. In the "C:\" partition, locate the "MySQL" folder.
    10. If you are more comfortable with the mouse, right click on this folder and choose Cut. If you prefer to use your keyboard, maneuver over the "MySQL" folder and press CTRL+X simultaneously.
    11. Now move over to your destination folder and paste the folder. Using mouse, right click on a white-space and choose Paste. Using your keyboard, press CTRL+V simultaneously.
    12. Before we go to the next step, please find the "my.ini" file in the root directory of MySQL.
    13. Open the "my.ini" file in your favorite browser (such as Notepad for example).
    14. Find the entry that says "datadir=".
    15. Make sure that this entry points to the "data" folder in the current folder of MySQL. For example:

      datadir=C:/mysql/data

      Please note that this file is also copied, by MySQL, into your Windows Directory. Therefore, after making changes to this file, also copy it to your Windows Directory for changes to be affected in both places.

    16. Now go to the "bin" folder of the new location of your "MySQL" folder and run the "winmysqladmin.exe" executable file.


    From one machine to another:

    1. Our software installs MySQL into "C:\MySQL". Please find this directory and navigate onto it. If you are comfortable with mouse, right click on this folder and select Copy. If you'd prefer to use your keyboard, press CTRL+C simultaneously on this folder.
    2. Now paste the folder into the destination machine using your favorite medium. Please note that from this step onwards, we are going to work on the MySQL folder in the DESTINATION machine and NOT the source machine.
    3. Please note that MySQL maintains two copies of a very important file called "My.ini" file. One in MySQL's root folder and one in the Windows directory of the host system. If you are moving MySQL from one system to the other, also make sure that you copy and paste the "My.ini" file from the source director to the Windows directory.
    4. Now navigate to the "bin" directory of the MySQL folder in the destination computer.
    5. Move over to and execute the "winmysqladmin.exe" file.
    6. Before we forget, you should now change the connection settings in Mekashron Business software also. Follow through the below steps.
    7. Execute and run our Mekashron Business software.
    8. In the Login window, make sure the Show database options check-box is ticked.
    9. Now change the MySQL Host / IP field to either the name of the new host for MySQL which in the above example we set to "Destination" or if you know the IP address of that machine, simply put the IP address in this box.

      Note: You can retrieve the IP address of a machine by pinging that machine. Use Start Menu -> Run -> CMD -> ping %MACHINE%. Where %MACHINE% is the name of that machine over the network.