0% found this document useful (0 votes)
7 views

Setting MySQL Storegrid DB Windows

Uploaded by

FrancesHsieh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Setting MySQL Storegrid DB Windows

Uploaded by

FrancesHsieh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Setting up MySQL as StoreGrid Backend Database on Windows

Overview

StoreGrid now supports MySQL as a backend database to store all the clients' backup metadata information. Unlike
StoreGrid using SQLite embedded database as its backend database, the MySQL database Server is external to the
StoreGrid backup server application. Using a client-server database as the backend database rather than an
embedded database would provider better scalability and performance. It also enables third party applications to
directly query StoreGrid's metadata for integration with those applications. To get StoreGrid to work with MySQL as
a backend database, you need to install MySQL Server either in the same machine where StoreGrid backup server is
installed or in another dedicated machine where you wish to store the StoreGrid's metadata information

Note : The following steps are also applicable for StoreGrid Replication Server using the MySQL database as a
backend database.

Install MySQL Server

Install MySQL Server 5.1 in the machine where you want to store the StoreGrid Backup Server's metadata.

1. Download MySQL 5.1 from the URL http://dev.mysql.com/downloads/mysql/5.1.html


2. Installation manual for installing MySQL in your windows operating system can be found at
http://dev.mysql.com/doc/refman/5.1/en/windows-installation.html
3. Please also go through the following URL while installing MySQL in your system:
http://dev.mysql.com/doc/refman/5.1/en/mysql-install-wizard-introduction.html

Configure MySQL Database Server

1. While configuring, you have to use custom options other than specified in '2.3.4 MySQL Server
Configuration Wizard' page, http://dev.mysql.com/doc/refman/5.1/en/mysql-config-wizard.html, for
smooth functioning of StoreGrid with MySQL ,
2. Choose the Configuration Type as 'Detailed Configuration' and go next.
3. Choose the Server Type as 'Server Machine'.
4. Choose the database usage as 'Transactional Database Only' and enter the InnoDB path by selecting
the option 'Specify InnoDB Data Directory'
5. Choose the Concurrent Connections as 'Online Transaction Processing (OLTP)' so that more db
connections can be created from the backup server to address more concurrent connections from the
clients.
6. In the Networking Option, please select the 'Enable Strict Mode' which will behave as traditional
database.
7. Select 'Standard Character Set' and choose 'latin1'. Characterset 'latin1' is used for English and many
Western European languages.
8. Enter the password for the root user that you would like to set for 'MySQL'.
9. Proceed with the configuration which will finish MySQL installation.

Create StoreGrid Database


Create a separate database for StoreGrid in the MySQL server.

1. Make sure MySQL is already running by checking the Mysql Service from Service Console. To open the
service console, execute 'service.msc' in 'Start -> Run'.
2. If Mysql service is not started then please start the Mysql service.
3. To create the database, open the MySQL console by 'Start -> All Programs -> MySQL -> MySQL
Server 5.1 -> MySQL Command Line Client' .
4. Enter the username as root and the MySQL password as you have entered during the MySQL Database
Server configuration.
5. Now you will see the mysql> prompt. Create the StoreGrid database by executing 'create database
[database name] collate latin1_general_cs;' where [database name] is the name of the database. Ex :
'create database StoreGridDB collate latin1_general_cs;'.

Install MySQL Connector/ODBC

Install the MySQL Connector in the StoreGrid backup server machine

1. After installing MySQL successfully you have to install MySQL Connector/ODBC. Please download the
MySQL Connector/ODBC 3.51 from the URL : http://dev.mysql.com/downloads/connector/odbc/3.51.html .
If your Backup Server/Replication Server uses 64 bit Operating System of Windows, then you need to
download and install the 64 bit MySQL ODBC connector as well as 32 bit MySQL ODBC connector. The 32
bit MySQL ODBC connector is needed for StoreGrid WebServices' access to the database.
2. Please go through the following URL to install MySQL Connector/ODBC Driver in the Windows machine :
http://dev.mysql.com/doc/refman/5.1/en/connector-odbc-installation-binary-windows.html#connector-
odbc-installation-binary-windows-installer . It is enough to follow the topic titled '21.1.3.1.1. Installing
the Windows Connector/ODBC Driver using an installer' in the above installation documentation.

Configure the MySQL Connector

Configure the MySQL Connector in the backup server as follows :

1. Open up the "Control Panel -> Administrative Tools -> DataSources (ODBC)" tool.
2. Go to the 'Connection Pooling' tab.
3. Scroll down and select 'MySQL ODBC 3.51 Driver' and double click on 'MySQL ODBC 3.51 Driver'.
4. You have to set the connection pooling attribute, hence select the option 'Pool Connections to this
driver' and enter 300 seconds for connection pooling.

If you are running 64 bit version of the Windows operating system then you have to configure 32-bit MySQL ODBC
Connector for the StoreGrid WebServices' access to the database.

1. Configure the 32 bit MySQL ODBC connector from the 32-bit version of the ODBC Datasources by running
the Odbcad32.exe file is located in the %systemdrive%\Windows\SysWoW64 folder.
2. Please follow the above steps to configure 32 bit ODBC connector in your 64 bit system.

Create System DSN

Create a system DSN in the backup server to access the StoreGrid database in the MySQL Server.
1. In the ODBC Data Source, go to the tab 'System DSN' and click on 'Add' button.
2. Scroll down and select 'MySQL ODBC 3.51 Driver' and finish.
3. Enter the Data Source Name as 'sgserver'.
4. Leave description as empty or enter StoreGrid Database, it is optional.
5. Enter Server [the dns name of the machine in which mysql is installed]'. If you have installed MySQL server
in the backup server itself, then you can sepcify it as 'localhost'
6. User as 'root'.
7. Password as entered in the MySQL Database Server Configuration.
8. If your ODBC Driver is successfully connected to your MySQL Server then it will list the database
'StoreGridDB' in which we are going to store the StoreGrid meta data information.
9. Select the database as 'StoreGridDB' from the drop down menu.

If you are running 64 bit version of the Windows operating system then you have to create System DSN using 32-
bit MySQL ODBC Connector for the StoreGrid WebServices' access to the database.

1. Open 32 bit MySQL ODBC connector from the 32-bit version of the ODBC Datasources by running the
Odbcad32.exe file is located in the %systemdrive%\Windows\SysWoW64 folder.
2. Please follow the above steps to create System DSN using configure 32 bit ODBC connector in your 64 bit
system.

Test connectivity with MySQL Server

After creating the MySQL driver and DSN in the backup server, check the connectivity from backup server to the
MySQL Server

1. Open up the "Control Panel -> Administrative Tools -> DataSources (ODBC)" tool.
2. Go to the tab 'System DSN' and select the Data Source Name.
3. Click on the 'Configure' button.
4. Verify or change the valid values in the connector and click on the 'Test' button. If there is any problem
click on 'Diagnostics' button to get the exact error message.

Specify the attributes during StoreGrid installation

After creating the DSN in the backup server, you need to specify the following value during the StoreGrid installation
in the backup server. Please specify DSN as 'sgserver', database name as 'StoreGridDB', user name as 'root' and
password(entered during the MySQL installation).

Troubleshooting Tips

StoreGrid is not started (or) repeatly crashes after startup

Solution : Stop StoreGrid application and start StoreGrid in command line by executing 'bin\StoreGrid.exe' from
[StoreGrid_Home] folder. Note the console print from the terminal. Please follow the solutions when the console
print are as follows :
1. Can't connect to local MySQL server...

Make sure that the MySQL server is running in the machine where MySQL is installed. Execute 'netstat -an
| grep 3306' (for linux) or 'netstat -an | find "3306"' (for Windows) in the machine where MySQL server is
running and check if the MySQL port 3306 (default mysql port) is in LISTEN state. If MySQL is not
running, please start the MySQL Server and then try starting StoreGrid.

2. Data source name not found...

Make sure that you have given the correct DSN name during the StoreGrid installation.
1. Open up the "Control Panel -> Administrative Tools -> DataSources (ODBC)" tool.
2. Go to the tab 'System DSN' and select the Data Source Name.
3. Click on the 'Configure' button.
4. Click on the 'Test' button. If there is any problem click on 'Diagnostics' button to get the exact
error message.

3. Access denied for user...

Check if you have given the correct user name and password for the MySQL Server during StoreGrid
installation.
1. Open up the "Control Panel -> Administrative Tools -> DataSources (ODBC)" tool.
2. Go to the tab 'System DSN' and select the Data Source Name.
3. Click on the 'Configure' button.
4. Click on the 'Test' button. If there is any problem click on 'Diagnostics' button to get the exact
error message.

4. Host 'xxxxx' is not allowed to connect to this MySQL server...

Provide the required permission in the MySQL to allow the backup server to connect the database. You
can do this by executing 'GRANT ALL PRIVILEGES ON *.* TO '[user name]'@'[backup server machine
name]' IDENTIFIED BY '[password]' WITH GRANT OPTION;' in the MySQL prompt in the machine where
MySQL Server is installed.

You might also like