Installation and Configuration Guide (for Linux)

Similar documents
v7.0 HP Intelligent Management Center MySQL 5.6 Installation and Configuration Guide (for Linux)

HPE Intelligent Management Center

v7.0 Intelligent Management Center MySQL 5.5 Installation and Configuration Guide (for Windows)

HPE Intelligent Management Center

HP Intelligent Management Center v7.1 MySQL 5.6 Installation and Configuration Guide (Windows)

Installation and Configuration Guide

SQL Server Installation and Configuration Guide. Abstract

HP 10500/ G Unified Wired-WLAN Module

SQL Server 2008 R2. Installation and Configuration Guide

SQL Server 2008 R2. Installation and Configuration Guide

Oracle 11g R2. Installation and Configuration Guide. Abstract

About the HP 830 Series PoE+ Unified Wired-WLAN Switch and HP 10500/ G Unified Wired-WLAN Module

HP High-End Firewalls

HP 5120 EI Switch Series

HP A5120 EI Switch Series IRF. Command Reference. Abstract

Guidelines for using Internet Information Server with HP StorageWorks Storage Mirroring

About the Configuration Guides for HP Unified

HP 5920 & 5900 Switch Series

HP 5920 & 5900 Switch Series

HP Intelligent Management Center Remote Site Management User Guide

Oracle 11g R2. Installation and Configuration Guide. Abstract

HP MSR Router Series. IPX Configuration Guide(V5) Part number: Software version: CMW520-R2513 Document version: 6PW

HP 527 Dual Radio ac Unified Wired-WLAN Walljack

HP 5820X & 5800 Switch Series IRF. Command Reference. Abstract

HPE Intelligent Management Center

HP StorageWorks. EVA Virtualization Adapter administrator guide

HP 5920 & 5900 Switch Series

HP StorageWorks 4000/6000/8000 Enterprise Virtual Array connectivity for Sun Solaris installation and reference guide

v7.0 HP Intelligent Management Center Database Installation

HP LeftHand P4000 Virtual SAN Appliance in an HP BladeSystem environment solution guide

HP Library and Tape Tools 4.20 Release Notes

HPE FlexNetwork MSR Router Series

H3C Intelligent Management Center v7.3

HP FlexFabric 5700 Switch Series

FUJITSU Cloud Service S5 Installation and Configuration of MySQL on a CentOS VM

HP ALM Client MSI Generator

HP Intelligent Management Center SOM Administrator Guide

System information update for system board replacement events

HP StorageWorks Performance Advisor. Installation Guide. Version 1.7A

HP StorageWorks Partitioning in an EBS Environment Implementation Guide

HP IDOL Site Admin. Software Version: Installation Guide

HP StoreOnce 4900 (44TB) and (60TB) Capacity Expansion Kit

HP Load Balancing Module

H3C Intelligent Management Center v7.3

HP Service Quality Management Solution

HPE IDOL Site Admin. Software Version: Installation Guide

External Devices. User Guide

HP D6000 Disk Enclosure Direct Connect Cabling Guide

Guest Management Software Administrator Guide. Installation and Getting Started Guide Administrator Guide

HP Enterprise Secure Key Manager Configuration Guide for HP Tape Libraries

HP 5130-POE-143 Release Notes

HP 3PAR StoreServ Storage VMware ESX Host Persona Migration Guide

HP Video Over Ethernet. User Guide

Virtual Recovery Assistant user s guide

HP 5130 EI Switch Series

Quick Setup & Getting Started

External Devices User Guide

H3C SecBlade SSL VPN Card

HP Web Jetadmin Report Generation Plug-in

HP Data Protector A Support for Windows Vista and Windows Server 2008 Clients Whitepaper

HP BladeSystem Management Pack (v 1.x) for Microsoft System Center User Guide

Modem Command Guidelines HP Notebook Series

HP Velocity User Guide for Thin Clients

HP-UX Software and Patching Management Using HP Server Automation

External Devices User Guide

HP Operations Orchestration Software

HP Insight Control for Microsoft System Center Installation Guide

HP Point of Sale (POS) Peripherals Configuration Guide Barcode Scanner

Veritas NetBackup for MySQL Administrator's Guide

HP 4120 IP Phone. User Guide

Veritas NetBackup for MySQL Administrator's Guide

HPE Knowledge Article

hp StorageWorks Using the QLogic Driver for Single-path or Multi-path Failover Mode on Linux Systems

HP Storage Manager User Guide. May 2005 (First Edition) Part Number

HP V1905 Switch Series Release Notes

HPE RDX Utility Version 2.36 Release Notes

External Devices User Guide

HPE PSR300-12A & PSR300-12D1

HP Data Protector Integration with Autonomy IDOL Server

HP Online ROM Flash User Guide. July 2004 (Ninth Edition) Part Number

H3C imc. Branch Intelligent Management System. User Manual. Hangzhou H3C Technologies Co., Ltd.

HPE StoreVirtual OS Update Guide

Cisco TEO Adapter Guide for Microsoft System Center Operations Manager 2007

Agilent OpenLAB Chromatography Data System (CDS)

IDE Connector Customizer Readme

HP Database and Middleware Automation

HP Intelligent Management Center

Standardize Microsoft SQL Server Cluster Provisioning Using HP DMA

Achieve Patch Currency for Microsoft SQL Server Clustered Environments Using HP DMA

HP Intelligent Management Center

HP ProLiant Agentless Management Pack (v 3.2) for Microsoft System Center User Guide

Videoscape Distribution Suite Software Installation Guide

Upgrading Software Version 3.1 to Version 4. HP ProCurve Secure Access 700wl Series.

HP StorageWorks Using the QLogic HBA driver for single-path or multipath failover mode on Linux systems application notes

HPE Knowledge Article

H3C License Server. Installation Guide. Hangzhou H3C Technologies Co., Ltd. Document version: 5W

HPE 3PAR OS MU3 Patch 18 Upgrade Instructions

Dell Protected Workspace Management

HP 3PARInfo 1.4 User Guide

Getting Started. HP Business PCs

Transcription:

v5.2 MySQL 5.5 Installation and Configuration Guide (for Linux) Abstract This document is intended to be the installation and configuration guide for MySQL in addition to the procedures for upgrading, removing, registering, and backup and restore. This document is intended for use by network engineers or system administrators responsible for installing network software and components. HP Part Number: 5998-1360 Published: 5.2 (E0401) Published: April 2013 Edition: 2.1

Copyright 2012, 2013 Hewlett-Packard Development Company, L.P. No part of this documentation may be reproduced or transmitted in any form or by any means without prior written consent of Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

Contents 1 Overview...4 2 Installation...5 Installing the MySQL server...5 Installing the MySQL client...6 Customizing MySQL file directories...7 3 Startup and stop...9 Starting up and stopping the MySQL service...9 Automatic startup...9 4 Configuring the MySQL server...10 Setting security options...10 Creating a remote root user account...12 Creating a database user account...12 Configuring MySQL configuration files...13 Configuring maximum connections...13 Configuring the character set...14 Configuring the engine type...14 Configuring case-insensitive table name...14 Disabling log-bin settings...14 Setting innodb buffer sizes...15 Setting the max_allowed_packet size...15 Changing the directory of logs and database files...15 5 Uninstallation...17 6 FAQs...18 7 Support and other resources...19 Contacting HP...19 Subscription service...19 New and changed information in this edition...19 Related information...19 Documents...19 Websites...19 Typographic conventions...19 Document conventions...20 GUI conventions...20 Symbols...20 Index...21 Contents 3

1 Overview A database is a prerequisite for installing IMC. Install and start the database service before you install IMC. This document describes how to install and configure the MySQL 5.5 database for use with IMC. The contents also apply to MySQL 5.1. Perform all operations described in this document as a Linux root user, unless otherwise specified. To install IMC on Linux 6.1, follow these guidelines: Prepare the following Linux packages: glibc-2.12-1.25.el6.i686.rpm libaio-0.3.107-10.el6.i686.rpm libgcc-4.4.5-6.el6.i686.rpm libstdc++-4.4.5-6.el6.i686.rpm Install the packages by using the following commands: rpm -i --nodeps glibc-2.12-1.25.el6.i686.rpm rpm -i --nodeps libaio-0.3.107-10.el6.i686.rpm rpm -i --nodeps libgcc-4.4.5-6.el6.i686.rpm rpm -i --nodeps libstdc++-4.4.5-6.el6.i686.rpm 4 Overview

2 Installation Before installing the MySQL server, copy the installation programs to the Linux server. This document uses MySQL-server-5.5.18-1.rhel15.x86_64.rpm and MySQL-client-5.5.18-1.rhel15.x86_64.rpm installation programs as examples as shown in Figure 1. Figure 1 MySQL installation programs on the Linux operating system Install both MySQL-server-5.5.18-1.rhel15.x86_64.rpm and MySQL-client-5.5.18-1.rhel15.x86_64.rpm on the database server. Install only MySQL-client-5.5.18-1.rhel15.x86_64.rpm on the IMC server that uses a remote database server. Then you must select other server for the database location and enter the server IP address during IMC installation. Installing the MySQL server 1. Enter the directory where the MySQL installation programs are located. 2. Run the rpm -ivh MySQL-server-5.5.18-1.rhel15.x86_64.rpm command to launch the MySQL server installation. Figure 2 Install the MySQL server Installing the MySQL server 5

3. Verify the installation. The MySQL service automatically starts when the MySQL server installation is complete, as shown in Figure 3. If the MySQL service did not automatically start, use the service mysql start command. By default, the MySQL server uses port number 3306. You can use the netstat command to check if the MySQL service is enabled. Figure 3 Check the MySQL service status The output shows that the MySQL service is running. Installing the MySQL client The MySQL client provides tools for MySQL management and user interaction, for example, mysqladmin and mysql. To install the MySQL client: 1. Enter the directory where the MySQL installation programs are located. 2. Run the rpm -ivh MySQL-client-5.5.18-1.rhel15.x86_64.rpm command to launch the MySQL client installation. Figure 4 shows the installation process. Figure 4 Install the MySQL client 6 Installation

3. Verify the installation. If the MySQL server is installed on the local server, enter the mysql command. Figure 5 shows that the MySQL client is successfully installed. Figure 5 Enter the mysql command If the MySQL server is installed on a remote server, make sure that the MySQL server contains your root user account, and enter the command shown in Figure 6 to check whether or not the client can connect to the MySQL server. Figure 6 Verify the connection to the MySQL server In the output, 192.168.20.211 is the IP address of the MySQL server, root is your root user account, and mysqlpassword is the password. The mysql prompt shows that the client has successfully connected to the MySQL server. Customizing MySQL file directories After the MySQL server and client are installed, the database files, configuration files, and command files are saved in different directories. Table 1 lists the default directories of MySQL server files. Table 1 MySQL server file directories Directory /usr/bin /usr/sbin Connector Client programs and scripts mysqld (MySQL service program) Customizing MySQL file directories 7

Table 1 MySQL server file directories (continued) Directory /var/lib/mysql /usr/share/mysql /etc/init.d/ /etc Connector Logs and database files Configuration files, error messages, and character set files Enables script mysql my.cnf To customize the directories, modify the datadir parameter in the file /etc/my.cnf. For example: datadir=/root/mysql_data The total size of logs and database files can grow large and is restricted by the maximum size of files allowed by the operating system. You can change the directory to a disk drive with large capacity. For more information about changing the directories of MySQL database files, see "Changing the directory of logs and database files." 8 Installation

3 Startup and stop Starting up and stopping the MySQL service MySQL is automatically configured as the system service after the MySQL server is installed. See Figure 7. You can start or stop the MySQL service to start and stop the MySQL server. Figure 7 Startup and stop commands You can also use the mysqladmin command to stop the MySQL server. Figure 8 The mysqladmin command You are required to enter the root user account password. If the MySQL server is installed for the first time, the password is empty. Press Enter. Automatic startup The MySQL service automatically starts when the system boots up. Figure 9 shows how to check whether the MySQL service is on the automatic startup list. Figure 9 Check whether the MySQL service is on the automatic startup list The output shows that the MySQL service automatically starts when Linux operates on any level from 2 to 5. Starting up and stopping the MySQL service 9

4 Configuring the MySQL server Disable the MySQL service when you perform operations described in the following sections, except for setting security options, creating a remote root user account, and creating a database user account. Setting security options After installing the MySQL server, run the mysql_secure_installation program to set security options, such as setting a root user password shown in Figure 10, and removing anonymous users or removing test database shown in Figure 11. The root user in this section refers to the MySQL database root user rather than the Linux root user. Figure 10 Set the root user password IMPORTANT: For IMC to properly identify the root user password during installation, ensure that the password does not contain any of the following characters: ` ' \ "! ( ) & \\ $ ; @ < > / ^ \t If you do not want to change the password of the root user, create a user account with root user privileges and ensure that the password does not contain any of the previous characters. For more information about the configuration steps, see "Creating a database user account." 10 Configuring the MySQL server

Figure 11 Remove anonymous users, disallow root login remotely, and remove test database The output shows that the remote root user is not enabled. For the configuration steps of the remote root user, see "Creating a remote root user account." After privilege tables are reloaded as shown in Figure 12, configuration is complete and MySQL installation is secure. Figure 12 Reload privilege tables Setting security options 11

Creating a remote root user account When installing IMC to use a remote database, you must log in to the database as a remote root user. In Figure 13, imc123 is the password of the root user, and imc123 is the password of the remote root user. You can change the password of the remote root user as needed. Figure 13 Create a remote root user account IMPORTANT: For IMC to correctly identify the password during installation, ensure that the password does not contain any of the following characters: ` ' \ "! ( ) & \\ $ ; @ < > / ^ \t Creating a database user account You can create a database user account and grant the user privileges to manage and operate the database. In Figure 14, imc123 is the password of the root user, imc_mysql is the new account name, and imcpassword is the password of the new user account. 12 Configuring the MySQL server

Figure 14 Create a database user account IMPORTANT: For IMC to correctly identify the password during installation, ensure that the password does not contain any of the following characters: ` ' \ "! ( ) & \\ $ ; @ < > / ^ \t Configuring MySQL configuration files Upon startup, MySQL server uses the default configuration file /etc/my.cnf, which provides the performance and behavior of the MySQL server. The file is not automatically generated. You must choose the proper settings from /usr/share/mysql. The file my-huge.cnf is required for support of IMC. Copy the file and save it as my.cnf, as shown in Figure 15. Figure 15 Copy file my-huge.cnf to file my.cnf Configuring maximum connections 1. Stop the MySQL service. 2. Enter the vi /etc/my.cnf command to enter the Visual interface (vi) editor. 3. Press the i key to enter the edit mode. 4. Modify the parameters. In the vi editor, add the max_connections parameter under [mysqld] in my.cnf. If this parameter already exists, you can change the value. [mysqld] max_connections=400 5. Press Esc to return to the common mode. 6. Press wq, save the edit, and quit the vi editor. You can set the maximum number of connections according to the installed modules. For more information about the maximum connections of different IMC modules, see HP IMC Getting Started Guide. Configuring MySQL configuration files 13

7. Start the MySQL service. Configuring the character set The English character set is latin1. To configure the character set: 1. Enter the vi /etc/my.cnf command to enter the vi editor. 2. Press the i key to enter the edit mode. 3. Modify the parameters. In the vi editor, add the character-set-server parameter under [mysqld] in my.cnf. If this parameter already exists, you can change the character set. vi /etc/my.cnf [mysqld] character-set-server=latin1 4. Press Esc to return to the common mode. 5. Press wq, save the edit, and quit the vi editor. Configuring the engine type 1. Enter the vi /etc/my.cnf command to enter the vi editor. 2. Press the i key to enter the edit mode. 3. Modify the parameters. In the vi editor, add the default-storage-engine parameter under [mysqld] in my.cnf. If this parameter already exists, you can change the type. vi /etc/my.cnf [mysqld] default-storage-engine = INNODB 4. Press Esc to return to the common mode. 5. Press wq, save the edit, and quit the vi editor. Configuring case-insensitive table name 1. Enter the vi /etc/my.cnf command to enter the vi editor. 2. Press the i key to enter the edit mode. 3. Modify the parameters. In the vi editor, add the lower_case_table_names parameter under [mysqld] in my.cnf. If this parameter already exists, you can change the value. vi /etc/my.cnf [mysqld] lower_case_table_names=1 4. Press Esc to return to the common mode. 5. Press wq, save the edit, and quit the vi editor. Disabling log-bin settings 1. Enter the vi /etc/my.cnf command to enter the vi editor. 2. Press the i key to enter the edit mode. 14 Configuring the MySQL server

3. Modify the parameters. In the vi editor, add the log-bin parameter under [mysqld] in my.cnf. If this parameter already exists, comment out the parameter. vi /etc/my.cnf [mysqld] #log-bin=mysql-bin 4. Press Esc to return to the common mode. 5. Press wq, save the edit, and quit the vi editor. Setting innodb buffer sizes 1. Enter the vi /etc/my.cnf command to enter the vi editor. 2. Press the i key to enter the edit mode. 3. Modify the parameters. In the vi editor, add the innodb_buffer_pool_size and innodb_additional_mem_pool_size parameters under [mysqld] in my.cnf. If this parameter already exists, you can change the values. [mysqld] innodb_buffer_pool_size=512m innodb_additional_mem_pool_size=16m 4. Press Esc to return to the common mode. 5. Press wq, save the edit, and quit the vi editor. Setting the max_allowed_packet size 1. Enter the vi /etc/my.cnf command to enter the vi editor. 2. Press the i key to enter the edit mode. 3. Modify the parameters. In the vi editor, add the max_allowed_packet parameter under [mysqld] in my.cnf. If this parameter already exists, you can change the value. [mysqld] max_allowed_packet = 200M 4. Press Esc to return to the common mode. 5. Press wq, save the edit, and quit the vi editor. Changing the directory of logs and database files 1. Stop the MySQL service. service mysql stop 2. Create a storage path for logs and database files. The path is /data/mysql_data in this example. mkdir p /data/mysql_data 3. Copy all files from the default directory to the new directory, and change ownership of the files. cp R /var/lib/mysql/* /data/mysql_data/ chown R mysql:mysql /data/mysql_data 4. Update the directory in the configuration file of the MySQL database. vi /etc/my.cnf Setting innodb buffer sizes 15

[mysqld] datadir=/data/mysql_data 5. Enable the MySQL service. service mysql start 16 Configuring the MySQL server

5 Uninstallation Uninstall the MySQL server and client as shown in Figure 16. Figure 16 Uninstall the MySQL server and client To check the component names, use the command shown in Figure 17. Figure 17 Check MySQL components You must manually remove database files after uninstallation. By default, the database files are saved in /var/lib/mysql. Use the rm rf command to remove the mysql directory. 17

6 FAQs Garbled characters appear in the database table Configure the character set when you install the MySQL server and client. If not, garbled characters can appear in the database table. How can I update database passwords for IMC? The usernames and passwords used by the IMC modules are stored in cipher text in file \common\conf\ server-addr.xml in the installation path. You can use the./pwdmgr command to obtain passwords in clear text or update the latest passwords to the file. Typically, you can use the database management tool to change the database password of an IMC module. To ensure communication between IMC and the database, use the./pwdmgr command to update the corresponding password in file server-addr.xml. If IMC is deployed in distributed mode, you must update the password for every imc server, as follows: [root@daemon8829 imc]# cd deploy/ [root@daemon8829 imc]#./pwdmgr.sh modify 127.0.0.1 config_db imc_config dbpasswd Change password successfully In the preceding commands, dbpasswd represents the latest database password of the imc_config user, config_db represents the database name, and 127.0.0.1 represents the IP address of the database. To obtain the IP address and name of a MySQL database, view the settings of the corresponding user in file $IMCROOT/common/conf/server-addr.xml. 18 FAQs

7 Support and other resources Contacting HP For worldwide technical support information, see the HP support website: http://www.hp.com/support Before contacting HP, collect the following information: Technical support registration number (if applicable) Product serial numbers Product model names and number Product identification number Applicable error message Add-on boards or hardware Third-party hardware or software Operating system type and revision level Subscription service HP recommends that you register your product at the Subscriber's Choice for Business website: http://www.hp.com/go/wwalerts After registering, you will receive email notification of product enhancements, new driver versions, firmware updates, and other product resources. New and changed information in this edition The following additions and changes have been made for this edition: A new "Support and other resources" chapter has been added. Related information Documents Websites To find related documents, browse to the Manuals page of the HP Business Support Center website: http://www.hp.com/support/manuals For related documentation, navigate to the Networking section, and select a networking category. For a complete list of acronyms and their definitions, see HP FlexNetwork Technology Acronyms. HP.com: http://www.hp.com HP Networking: http://www.hp.com/go/networking HP download drivers and software: http://www.hp.com/support/downloads Typographic conventions This section describes the conventions used in this documentation set. Contacting HP 19

Document conventions Table 2 Document conventions Convention Blue text: Table 2 (page 20) Blue, underlined text: http:// www.hp.com Description Cross-reference links and email addresses Website addresses Bold text Keys that are pressed Text typed into a GUI element, such as a box GUI elements that are clicked or selected, such as menu and list items, buttons, tabs, and check boxes Italic text Text emphasis Monospace text File and directory names System output Code Commands, their arguments, and argument values Monospace, italic text Code variables Command variables Monospace, bold text Emphasized monospace text GUI conventions Table 3 GUI conventions Convention Boldface > Description Window names, button names, field names, and menu items are in bold text. For example, the New User window appears; click OK. Multi-level menus are separated by angle brackets. For example, File > Create > Folder. Symbols WARNING! An alert that calls attention to important information that if not understood or followed can result in personal injury. CAUTION: An alert that calls attention to important information that if not understood or followed can result in data loss, data corruption, or damage to hardware or software. IMPORTANT: An alert that calls attention to essential information. NOTE: An alert that contains additional or supplementary information. 20 Support and other resources

Index A automatic startup, 9 C case-insensitive table name, 14 character set, 14 component names, 17 configuration files, 13 configuring case-insensitive table name, 14 character set, 14 engine type, 14 maximum connections, 13 MySQL configuration files, 13 connections, 13 contacting HP, 19 creating a database user, 12 a remote root user, 12 D database passwords, 18 database user, 12 disabling log-bin settings, 14 documentation, 19 typographic conventions, 20 E engine type, 14 F FAQs, 18 file directories, 7 file directories for MySQL server, 7 G garbled characters, 18 H help obtaining, 19 HP technical support, 19 maximum connections, 13 MySQL client installation, 6 MySQL file directories, 7 MySQL server installation, 5 P password, 10 privilege tables, 11 R registering product, 19 subscription service, 19 reloading privilege tables, 11 remote root user, 12 root user password, 10 S setting innodb buffer sizes, 15 the max_allowed_packet size, 15 setting security options, 10 starting and stopping MySQL service, 9 T technical support, 19 HP, 19 typographic conventions documentation, 19 symbols, 20 text GUI conventions, 20 U uninstallation, 17 updating, 18 database passwords, 18 user password, 10 W websites, 19 I innodb buffer sizes, 15 installing MySQL client, 6 MySQL server, 5 L log-bin settings, 14 M max_allowed packet size, 15 21