- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-Text | 5.01 MB |
Adding an environment variable value
Creating a remote root user account
Overview
This document describes how to install and configure the MySQL 5.5 database on Windows Server 2012 R2. The installation procedures for MySQL databases of other versions might vary. For more information, see their respective installation and configuration guides.
IMPORTANT: Before you install IMC, you must install and start the MySQL server. If IMC is deployed in distributed mode, the master and subordinate IMC servers must use the same MySQL server as the database server. |
Prerequisites
Before the installation, copy the installation program to the Windows server. This document uses the mysql-installer-community-5.5.62.0.msi installation program.
Make sure Microsoft Visio C++ 2008 and Microsoft .Net Framework 4.5.2 have been installed before you install the MySQL server or client on the Windows server system.
Installation
If IMC will use a local database, install the MySQL server on the same server where IMC will be installed.
If IMC will use a remote database server, install the MySQL server on the database server and install the MySQL client on the same server as IMC. The MySQL client must be installed before you install IMC. During IMC installation, you must select other server and specify the server address to test the database connection.
Installing the MySQL server
1. Double-click the MySQL installation program to start the setup wizard.
The License Agreement dialog box opens.
2. Select I accept the license terms, and then click Next.
The Choosing a Setup Type dialog box opens.
Figure 2 Choosing a setup type
3. Select Server only.
4. Click Next.
The Installation dialog box opens.
5. Click Execute.
To view detailed information about the installation progress, click Show Details in the Installation dialog box.
Figure 4 Viewing detailed information about the installation progress
6. Click Next after the installation is complete.
The Product Configuration dialog box opens.
Figure 5 Product Configuration
7. Click Next.
The Type and Networking dialog box opens.
8. Configure the following parameters for the MySQL server:
¡ From the Config Type list, select Server Computer or Dedicated Computer. The list provides a description for each configuration type.
¡ Select TCP/IP, and then enter the port number to be used by the MySQL server. Make sure the port number is not used by other applications. This example uses the default port of 3306.
¡ Select Open Firewall port for network access to prevent the firewall from blocking the MySQL database connection.
9. Click Next.
10. Set a password for the root user account. The password must contain a minimum of four characters.
Figure 7 Setting a password for the root user
Make sure the password of the root user does not include spaces, tabs (\t), or any characters in Table 1. Otherwise, the password cannot be recognized during IMC installation.
Character name |
Symbol |
Ampersand |
& |
Apostrophe |
' |
At sign |
@ |
Back quote |
` |
Backslash |
\ |
Caret |
^ |
Dollar sign |
$ |
Exclamation point |
! |
Left angle bracket |
< |
Left parenthesis |
( |
Quotation marks |
" |
Right angle bracket |
> |
Right parenthesis |
) |
Semicolon |
; |
Slash |
/ |
Vertical bar |
| |
11. Click Next.
The Windows Service dialog box opens.
Figure 8 Windows Service
12. Configure the following parameters:
¡ Select Configure MySQL Server as a Windows Service.
¡ Enter a Windows service name in the Windows Service Name field. This example uses the default value.
¡ Select Start the MySQL Server at System Startup.
¡ Select Standard System Account in the Run Windows Service as area.
13. Click Next.
The Apply Configuration dialog box opens.
14. Click Execute.
After the configuration is complete, the configuration success message opens.
Figure 10 Configuration success
The Product Configuration page opens.
Figure 11 Product Configuration
16. Click Next.
The Installation Complete dialog box opens.
Figure 12 Installation Complete
17. Click Finish.
Installing the MySQL client
If the database and IMC will be deployed on different servers, install the MySQL client on each IMC server after installing the MySQL server on the database server.
The MySQL client must be installed on the IMC server before you install IMC. When configuring the remote database, select other server for the database location.
IMPORTANT: Make sure Microsoft Visio C++ 2008 and Microsoft .Net Framework 4.5.2 have been installed before you install the MySQL client on the Windows server system. |
1. Double-click the MySQL installation program to start the setup wizard.
The License Agreement dialog box opens.
2. Select I accept the license terms, and then click Next.
The Choosing a Setup Type dialog box opens.
Figure 14 Choosing a Setup Type
3. Select Custom, and then click Next.
The Select Products and Features dialog box opens.
Figure 15 Select Products and Features
4. Select Client Programs, and then click Next.
The Installation dialog box opens.
5. Click Execute to install the MySQL client on the server.
Figure 17 Installation operation
6. Click Next after the installation is complete.
The Product Configuration dialog box opens.
Figure 18 Product Configuration
7. Click Cancel.
The Cancel dialog box opens.
Figure 19 Cancel adding products
8. Click Yes.
Testing the connectivity
After the MySQL client is installed, add the MySQL client installation path as a PATH environment variable value. For more information, see "Adding an environment variable value."
After adding the installation path as an environment variable value, make sure the MySQL server on the remote database server has been started.
To test the connectivity between the MySQL client and the server:
1. Select Start > Run.
2. In the Run dialog box, enter cmd, and then click OK.
3. In the CLI window, enter the following command:
mysql -h192.168.7.165 -uroot -piMC123iMC -P3306
In this command, 192.168.7.165 is the IP address of the database server, root is the remote MySQL username (see "Creating a remote root user account" for information about creating a remote MySQL user account), iMC123iMC is the password of the user root, and 3306 is the default port number of the MySQL database.
If you can enter the MySQL CLI mode, the client can connect to the MySQL server.
Figure 20 Testing the connectivity between the MySQL client and server
Startup and stop
1. Select Start > All Programs > Administrative Tools > Services.
The Services window opens.
Figure 21 Starting or stopping the MySQL service
2. Right-click the Windows service name. The default name is MySQL55.
A shortcut menu opens.
3. Click Start or Stop to start or stop the service, as required.
The Start option is available only when the MySQL55 service is not running. The Stop option is available only when the MySQL55 service is running.
Configuring the MySQL server
Adding an environment variable value
To execute the MySQL server management commands (for example, mysqld, mysqlshow, and mysqladmin) in the CLI window, add the MySQL server or client installation path as a PATH environment variable value. This procedure uses the MySQL server installation path as an example.
1. Select Start > Control Panel > System and Security > System.
The View basic information about your computer page opens.
Figure 22 Viewing basic information about your computer
2. Click Advanced system settings.
The System Properties dialog box opens.
3. Click the Advanced tab, and then click Environment Variables.
The Environment Variables dialog box opens.
Figure 24 Environment Variables
4. In the System variables area, select Path, and then click Edit.
The Edit System Variable dialog box opens.
Figure 25 Edit System Variable
5. In the Variable value field, add the storage path for the programs in the MySQL installation directory. The default path is C:\Program Files\MySQL\MySQL Server 5.5\bin. Use a semicolon (;) to separate the path from the preceding variable values.
6. Click OK in the Edit System Variable, Environment Variables, and System Properties dialog boxes to save the configuration.
7. Restart the operating system to make the new environment variable value take effect.
Configuring MySQL parameters
The default configuration file my.ini in the data path for the MySQL server determines the functions and performance of the MySQL server. The default data path for the my.ini file is C:\ProgramData\MySQL\MySQL Server 5.5.
Modifying parameters in the my.ini file
You must modify any parameters in the my.ini file that do not meet the IMC requirements.
To modify the parameters:
1. Stop the MySQL service.
For information about stopping the MySQL service, see "Startup and stop."
2. Enter the data path for storing the MySQL data files.
If the data path is the default path, ProgramData is a hidden file folder. For information about viewing the hidden file folder, see "Why can't I find the ProgramData file folder on the system disk?"
3. Double-click the my.ini file.
The file opens in Notepad by default.
Change the parameter values under [mysql] and [mysqld]. Table 2 describes the parameters in the my.ini file.
a. Under [mysql], change the value of the default-character-set parameter to match your operating system language. This example uses latin1. If you change the character after IMC has been deployed, you must reinstall IMC.
b. Under [mysqld], make the following changes:
- Add the parameter lower_case_table_names=1.
- Change the value of the character-set-server parameter to latin1.
- Change the value of the innodb_buffer_pool_size parameter to 512M.
- Change the value of the innodb_additional_mem_pool_size parameter to 16M.
- Change the value of the max_allowed_packet parameter to 200M.
- Add the value of the default-time-zone parameter +8:00.
- Add the value of the max_connections parameter 800.
Parameters |
Description |
lower_case_table_names |
Indicate whether a table name is case sensitive. · 0—Yes · 1—No |
default-character-set and character-set-server |
Character sets required by the MySQL database. The character set for English is latin1. |
innodb_buffer_pool_size |
Size of the InnoDB buffer pool. |
innodb_additional_mem_pool_size |
Size of the InnoDB additional memory pool. |
max_allowed_packet |
Maximum allowed size for a packet. |
max_connections |
Maximum number of connections allowed by the MySQL server. You can modify this number based on the number of deployed IMC components. For the maximum number allowed for each component or subcomponent, see IMC Getting Started Guide. |
default-time-zone |
Sets the default server time zone. Named time zones can be used only if the time zone information tables in the MySQL database have been created and populated, for example, Europe/Helsinki. |
transaction_isolation |
Transaction isolation level. Check whether the transaction_isolation parameter exists under [mysqld] when installing EIA: · If that parameter does not exist, add transaction_isolation=READ-COMMITTED under [mysqld]. · If that parameter exists, change the value to READ-COMMITTED. |
4. Select File > Save As, specify the ANSI coding format, click Save to save the my.ini file, and then restart the MySQL server.
Backing up the database
When you use the mysqldump program to back up the database, the backup progress might be slow and cause data backlog. No data or not much data will be available during the database backup period. To resolve the issue, modify the my.ini file as follows:
1. Open the my.ini file
2. Add the mysqldump parameter
[mysqldump]
single-transaction
3. Save the file, and then exit.
Creating a remote root user account
By default, the MySQL server has only one local root user account. If you want to use IMC with a remote database, install the MySQL client and configure a remote root user account on the database server.
1. Select Start > All Programs > MySQL > MySQL Server 5.5 > MySQL 5.5 Command Line Client.
Figure 27 Opening the MySQL CLI
2. Enter the root user account password.
Figure 28 Entering the root user account password
Figure 29 MySQL CLI
3. Enter the following statement in the mysql> command line:
grant all privileges on *.* to root@’%’ identified by ‘iMC123’ with grant option;
Figure 30 Executing the statement
Deleting users with empty passwords
1. Select Start > All Programs > MySQL > MySQL Server 5.5 > MySQL 5.5 Command Line Client.
Figure 31 Opening the MySQL CLI
2. Enter the root user account password.
Figure 32 Entering the root user account password
Figure 33 MySQL CLI
3. Enter the following statements in sequence to view user information:
use mysql;
select user,host,password from mysql.user;
Figure 34 Executing the statement
4. Enter the following command to delete users with empty passwords.
delete from user where password='';
5. Enter the following command to refresh privileges, as shown in Figure 35.
flush privileges;
Uninstallation
The uninstall methods for the MySQL server and client are similar.
To uninstall the MySQL server:
1. Select Start > All Programs > MySQL > MySQL Installer – Community > MySQL Installer - Community, as shown in Figure 36.
The MySQL Installer page opens, as shown in Figure 37.
Figure 36 Starting the MySQL Installer
2. Click Remove.
The Remove Products dialog box opens.
3. Select MySQL Server 5.5.62, and then click Execute.
A confirmation dialog box opens.
Figure 39 Confirming removal of the selected product
4. Click Yes.
Figure 40 Viewing the product removal progress
The Remove Data Folder dialog box opens before the uninstall process is complete.
5. Click Yes.
The Remove Products dialog box opens.
6. Click Next in the Remove Products dialog box.
The Removal Complete dialog box opens.
7. Select Yes, uninstall the MySQL Installer and Yes, reboot when done, and then click Finish.
A confirmation dialog box opens.
Figure 44 Confirmation dialog box
8. Click Yes.
FAQ
Why can't I find the ProgramData file folder on the system disk?
ProgramData is a hidden folder on the system disk.
To view the folder:
1. Open any folder in Windows Server 2012 R2.
2. On the View tab, click Options.
Figure 45 Opening the Folder Options window
3. In the Folder Options window that opens, click the View tab. In the Advanced settings area, select Files and Folders > Hidden files and folders > Show hidden files, folders, and drives.
Figure 46 Displaying the hidden file folder
4. Click OK.
Why do garbled characters appear in the database table?
If you use an English operating system, set the values of the default-character-set and character-set-server parameters to latin1. For more information, see "Configuring MySQL parameters."
If your operating system language is different, see the related MySQL documentation for the correct character set.
How do I update the database password for the IMC server?
2. In the Run dialog box, enter cmd, and then click OK.
3. In the CLI window, enter the following command:
"E:\Program Files\iMC\deploy\instInfoMgr.bat" –modify dbAdminPwd=yourpassword
For example, change the password to iMC123456, as shown in Figure 47.
Figure 47 Changing the database password on the iMC server
4. Click the Environment tab on the Intelligent Deployment Monitoring Agent window, and then click Refresh in the Database Space Usage area.