Installing MySQL in a Windows environment
Install and configure a MySQL database
- Download and run the latest Windows MSI Installer for MySQL Community Server 5.5 from www.mysql.com.
- In the setup wizard, click the Typical setup type and follow the instructions on the screen.
- Select the Launch the MySQL Instance Configuration Wizard check box.
- Click Finish.
In the configuration wizard, follow the instructions on the screen
and use the default configuration settings, except for the following settings:
- Choose the Transactional Database Only option
- For the approximate number of concurrent connections to the server, click Online Transaction Processing (OLTP).
- For the default character set, click Best Support for Multilingualism.
- For the Windows options, click the Include Bin Directory in Windows PATH check box.
If you plan to use the Push Service SDK setup application on a computer other than the computer where you installed
perform the following actions:
- On the computer where you plan to run the setup application, download the Windows ZIP archive option for MySQL Community Server 5.5 from www.mysql.com and extract the files.
- In the location where you extracted the files, navigate to the bin folder and copy the file path.
- Append the file path that you copied to the value for the PATH environment variable.
Create a server instance
- Download and install the MySQL Workbench 5.2 CE from www.mysql.com.
- 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 Complete Setup screen, type pushsdk or any desired 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.
- Right-click the Object Browser section. 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_general_ci.
- Click Apply twice.
- Click Finish to apply the changes to the server instance.
Create a 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.
- Click the Server Access Management tab, and then click Add Account at the bottom.
- Click the Login tab and specify a login name and password for the user.
- In the Limit Connectivity to Hosts Matching field, type one or more names and host machines that the user can connect from (for example, localhost).
- Click Apply.
- On the Schema Privileges tab, in the Users column, click the user account you created.
- Click Add Entry.
- In the Host section, select the Selected host option.
- 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, select the Selected schema option.
- 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.
- Click Save Changes.
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 user name 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.