Working with Embedded Server

Embedded Server is an easy at installation server to be used by applications that do not require multi-user work with data. As an example, Embedded Server can be used for money access machines, automatic cash desks, different electronic facilities and so on. Please refer to MySQL Reference Manual for more details about Embedded Server’s features, usage, and licensing.

Limitations

Here are known restrictions of current Embedded Server version. All of them are caused by the server itself, it is not a problem of Fusion for MySQL. For troubleshooting tips, refer to MySQL documentation.

  • Simultaneous usage of several copies of Embedded Server at the same machine can cause unexpected errors;
  • Running Embedded and common Servers on the same machine can cause troubles. Simultaneous access to the same data from different instances of MySQL Server (for example, from MySQL Server and Embedded Server) can be a reason of data loss;
  • Switching between Embedded MySQL Server and MySQL Server in case of using InnoDB also can cause unexpected problems;
  • Your application may suddenly shut down if you have wrong configuration for Embedded Server. The same thing may happen because of some error inside the Server.

To install Embedded Server:

  1. Download the server installation package from MySQL AB web site (http://dev.mysql.com/downloads/mysql/).
  2. Install the server.
  3. Create a directory for your Embedded Server. This will be your basedir directory.
  4. Make sure you have libmysqld.dll available through PATH environment variable (for example, place it to your Windows\System32 directory), or place it to a directory, where Fusion for MySQL is installed.
  5. Copy share folder from the MySQL server installation to the basedir.
  6. Create a folder for data inside the basedir directory. This is your datadir directory. You can copy here mysql folder from your Server installation.
  7. Now, you can use MySQL Embedded Server.

To configure Embedded Server:

Do either of these ways to configure the Embedded Server before using it:

  • Use the my.ini file
  • Specify data as parameters in connection string

To use my.ini file, you have to create it at the root Windows folder and fill its following sections:

**[Server] **- common settings for MySQL usual and Embedded servers.

[Embedded] - settings specific to Embedded server.

Tip: Find the details about the list of settings in MySQL Reference Manual.

Minimal my.ini example:

[embedded]
basedir=c:/servers/embedded/
datadir=c:/servers/embedded/data/

According to this configuration, contents of the share folder can be found in the *c:\servers\embedded\share* path, data is located in the *c:\servers\embedded\data* folder. Notice the use of forward slashes instead of backslashes.

To connect to Embedded Server:

  1. Open the Database Connection Properties dialog box by any of these ways:
    • On the Fusion menu, select New Connection
    • Click the New Connection button on the Database Explorer toolbar
    • Right-click in the Database Explorer window and select New Connection on the menu

    Note

    The Database Explorer is not available in the dbForge Data Compare for MySQL, dbForge Schema Compare for MySQL.

  2. Switch to the Embedded tab of the Database Connection Properties dialog box.
  3. Check Use embedded server.
  4. Clear the Use my.ini file check box and fill Base directory and Data directory fields if you want to set these directories manually and don’t want to use my.ini file.
  5. Click OK to establish the database connection.