StoreGrid Backup Server With MySQL As Backend Database: Installing and Configuring MySQL 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.0 in the machine where you want to store the StoreGrid Backup Server's metadata. 1. Download MySQL 5.0 from the URL http://dev.mysql.com/downloads/mysql/5.0.html 2. Installation manual for installing MySQL in your windows operating system can be found at http://dev.mysql.com/doc/refman/5.0/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.0/en/mysql-install-wizard-starting.html Configure MySQL Database Server 1. While configuring, you have to use custom options other than specified in '2.9.4 MySQL Server Configuration Wizard' page, http://dev.mysql.com/doc/refman/5.0/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.0 -> 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. 2. Please go through the following URL to install MySQL Connector/ODBC Driver in the Windows machine : http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-installation-binary-windows.html#connectorodbc-installation-binary-windows-installer. It is enough to follow the topic titled '19.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 : 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. 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. 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 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. 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.
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.