CA Application TestCA Continuous Application Insight (PathFinder)Service Virtualization
Issue/Introduction
Here is quick steps to setup MySQL.
The DevTest specific data is in the Install manual, the MySQL information is not, here is the cheat sheet.
Environment
All supported DevTest releases.
Cause
N/A
Resolution
Steps 1) Download MySQL DB and JDBC client (this example using JDBC Client jar version 5.1.45) 2) Install MySQL supported for the version of DevTest you are on (this example is MySQL 5.7) 3) Configure MySQL for default code page 4) Create database and user for the Enterprise Dashboard and Registry configure Enterprise Dashboard configure Registry 5) check for tables and handy commands
1— Download and install MySQL for your platform, current version is 5.7.20 (http://dev.mysql.com/downloads/mysql/) Download and install JDBC client for MySQL referred to as Connector/J, current version is 5.1.45 (http://dev.mysql.com/downloads/connector/j/), you will need to put the .jars into your /lib/shared and /lib/dradis folders
2— Install on disk or accept default, the following instructions are based on default You need put the JDBC client jar into LISA classpath Copy the mysql-connector-java-5.1.45-bin.jar to the install LISA_HOME\lib\shared and LISA_HOME\lib\dradis folders and to all LISA_HOME\lib\shared folders on each Workstation.
3— The database needs to have the default code page set for UTF8, you will need the following files on Windows or OSX.
File Name => my.ini location OSX=> /usr/local/mysql location Windows => C:\ProgramData\MySQL\MySQL Server 5.7
4— Create 2 databases, one for Enterprise Dashboard and one for the Registry. My edbdatabase is for the Enterprise Dashboard and the regdatabase is for the Registry. One user is added to the system and associated with each database. The default login for MySQL is root with no password. Once you have set a password you will need a -p to state you are specifying one.
mysql -u root
The following command are submitted via the command line utility mysql
create database edbdatabase default character set utf8 default collate utf8_unicode_ci;
create database regdatabase default character set utf8 default collate utf8_unicode_ci;
grant usage on *.* to dtuser@localhost identified by 'itkorocks'; grant all privileges on edbdatabase.* to dtuser@localhost ; grant all privileges on regdatabase.* to dtuser@localhost ;
You can now login to the mysql command line with this command, the password will be prompted. To switch between the two databases use the “use command”
mysql -u dtuser -p
use regdatabase; use edbdatabase;
5— The Enterprise Dashboard uses dradis.properties to set the edbdatabase.
To see a database and tables use this while logged in as root:
show databases; show tablesin edbdatabase; show tablesin regdatabase;
To export or backup database to send to someone use this:
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqldump --user=dtuser --password=itkorocks regdatabase > c:\regdatabase.sql
Additional Information
NOTE:
Recommended to install MySQL Workbench if running on a Windows platform or a Linux platform that accepts GUI, it is much easier to create schemas and users.