Installing MySQL in a Windows environment
Install and configure a MySQL database
Download and run the latest Windows MSI
Installer for MySQL Community
- In the setup wizard, click Install MySQL Products, and select the default setting for each screen until you reach the Setup Type screen.
On the Setup Type screen, perform the
- Click Custom.
- Select the MySQL Server 5.5.xx checkbox.
- Expand the Applications option, and select the MySQL Workbench CE checkbox only.
- Expand the MySQL Connectors option, and select the Connector/J checkbox only.
- On the Installation screen, click Execute to install the MySQL products listed in step 3.
- On the Configuration screen, accept the default settings and click Next.
- Type a root account password, and add a new user account. You'll need the account when you create the database schema.
- Accept the remaining default settings for the configuration, and complete the installation.
Create a server instance
- On the Home screen for the MySQL Workbench, in the Server Administration section, click New Server Instance.
- 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.
- To specify the host machine for the database server, select localhost. Click Next.
To create the database connection, on the Parameters tab, perform
the following actions:
- Leave the default values in the Hostname, Port, and Username fields (localhost, 3306, and root).
- In the Password field, click Store In Vault and type the password that you specified when you installed and configured the MySQL database.
- Leave the Default Schema field blank.
- Click Next.
- On the Windows Management screen, click MySQL55 from the service drop-down list
- On the Complete Setup screen, type pushsdk or some other name for the server instance.
Configure the server instance
- On the Home screen for the MySQL Workbench 5.5, in the Server Administration section, double-click the server instance you created.
- In the left panel, click Configuration > Options File, and then click the Advanced tab.
- Select the sql-mode check box.
- To make the database behave like a traditional SQL database management system, replace the existing content of the field with "TRADITIONAL".
- Click Apply twice.
- In the left panel, click Management > Startup / Shutdown, and then click Stop Server.
- After the server stops, click Start Server to allow the new configuration to take effect.
Create the database schema
- 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.
- In the Object Browser section, right-click the schema labeled test, and click Create Schema.
- In the Name field, specify a name for the database schema (for example, pushsdk).
- 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.
- Click Apply twice.
- 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 through a Push Initiator.
- On the Home screen for the MySQL Workbench, in the Server Administration section, double-click the server instance that you created.
- From the left panel, click Security > Users and Privileges.
- On the Schema Privileges tab, select the user account that you created when you installed and configured the MySQL database.
- Click Add Entry.
- In the Host section, click Selected host.
- In the Selected host drop-down list, click the host machine that you want to define the privileges for (for example, localhost).
- In the Schema section, click Selected schema.
- In the Selected schema list, click the database schema that you created and that you want to define the privileges for.
- Click OK.
- Click Select "ALL" to assign the user all privileges for this database schema.
Create a new connection to the database schema
- On the Home screen for the MySQL Workbench, in the SQL Development section, click New Connection.
- In the Connection Name field, type a name for the connection.
- In the Hostname field, type the name of the host machine that the server instance is installed on (for example, localhost).
- In the Port field, type 3306.
- In the Username field, type the username of the user that you created for the database schema.
- In the Password field, click Store In Vault.
- Type the password of the user that you created for the database schema.
- In the Default Schema field, type the name of the database schema that you created.
- Click OK.