Installing MySQL in Windows

Install and configure a MySQL database

  1. Download and run the latest Windows MSI Installer for MySQL Community Server 5.5.
  2. In the setup wizard, click Install MySQL Products, and select the default setting for each screen until you reach the Setup Type screen.
  3. On the Setup Type screen, perform the following actions.
    1. Click Custom.
    2. Select the MySQL Server 5.5.xx check box.
    3. Expand the MySQL Connectors option, and select the Connector/J check box only.
  4. On the Installation screen, click Execute to install the MySQL products that are listed in step 3.
  5. On the Configuration screen, accept the default settings and click Next.
  6. Type a root account password and add a new user account. You need the account when you create the database schema.
  7. Accept the remaining default settings for the configuration, and complete the installation.

Create a server instance

  1. Download and install MySQL Workbench 5.2.
  2. On the Home screen for the MySQL Workbench, in the Server Administration section, click New Server Instance.
  3. In the Create New Server Instance Profile wizard, follow the instructions on the screen and use the default configuration settings except for the settings described below, in steps 4 to 6.
  4. To specify the computer for the database server, select localhost. Click Next.
  5. To create the database connection, on the Parameters tab, perform the following actions:
    1. Leave the default values in the Hostname, Port, and Username fields (localhost, 3306, and root respectively).
    2. In the Password field, click Store In Vault and type the password that you specified when you installed and configured the MySQL database.
    3. Leave the Default Schema field blank.
    4. Click Next.
  6. On the Windows Management screen, in the service drop-down list, click MySQL55.
  7. On the Complete Setup screen, type pushsdk or some other name for the server instance.

Configure the server instance

  1. On the Home screen for the MySQL Workbench, in the Server Administration section, double-click the server instance that you created.
  2. In the left panel, click Configuration > Options File, and then click the Advanced tab.
  3. Select the sql-mode check box.
  4. To make the database behave like a traditional SQL database management system, replace the existing content of the field with "TRADITIONAL".
  5. Click Apply twice.
  6. In the left panel, click Management > Startup / Shutdown, and then click Stop Server.
  7. After the server stops, click Start Server to allow the new configuration to take effect.

Create the database schema

  1. On the Home screen for the MySQL Workbench, in the SQL Development section, double-click the database connection that you created when you created the server instance for the database.
  2. In the Object Browser section, right-click the schema labeled test, and click Create Schema.
  3. In the Name field, specify a name for the database schema (for example, pushsdk).
  4. In the Collation drop-down list, click a default collation type. If you use UTF-8, for a case-sensitive collation type, click utf8_bin. For a case-insensitive collation type, click utf8_unicode_ci.
  5. Click Apply twice.
  6. Click Finish to apply the changes to the server instance.

Configure the user account for the database schema

The user account that you set up in this task is the user account that you use to access the database tables in your server-side push initiator.

  1. On the Home screen for the MySQL Workbench, in the Server Administration section, double-click the server instance that you created.
  2. In the left panel, click Security > Users and Privileges.
  3. On the Schema Privileges tab, select the user account that you created when you installed and configured the MySQL database.
  4. Click Add Entry.
  5. In the Host section, click Selected host.
  6. In the Selected host drop-down list, click the computer that you want to define the privileges for (for example, localhost).
  7. In the Schema section, click Selected schema.
  8. In the Selected schema list, click the database schema that you created and that you want to define the privileges for.
  9. Click OK.
  10. Click Select "ALL" to assign the user all privileges for this database schema.

Create a connection to the database schema

  1. On the Home screen for the MySQL Workbench, in the SQL Development section, click New Connection.
  2. In the Connection Name field, type a name for the connection.
  3. In the Hostname field, type the name of the computer that the server instance is installed on (for example, localhost).
  4. In the Port field, type 3306.
  5. In the Username field, type the username of the user that you created for the database schema.
  6. In the Password field, click Store In Vault.
  7. Type the password of the user that you created for the database schema.
  8. In the Default Schema field, type the name of the database schema that you created.
  9. Click OK.

Last modified: 2015-06-11



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus