WSO2 Certificate Import & Export

Sample commands

The following two commands are examples if you are using the keystore and client-truststore of the Identity Server itself for the client. This is executed from the <IS_HOME>/repository/resources/security directory.

keytool -export -alias wso2carbon -file carbon_public2.crt -keystore wso2carbon.jks -storepass wso2carbon

keytool -import -trustcacerts -alias carbon -file carbon_public2.crt -keystore client-truststore.jks -storepass wso2carbon

See MYSQL DB CONSTRAINTS

USE INFORMATION_SCHEMA;

SELECT TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME,REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME
FROM KEY_COLUMN_USAGE
WHERE TABLE_SCHEMA = "rs_dbApiMgt"  AND REFERENCED_COLUMN_NAME IS NOT NULL;

Database sizes in MB

DATABASE SIZES
SELECT table_schema "DB Name", 
   Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" 
FROM   information_schema.tables 
GROUP  BY table_schema; 

TABLE SIZE
SELECT  table_name AS `Table`,  round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` 
FROM information_schema.TABLES WHERE table_schema = "rs_dbApiMgt" ;

MYSQL Create User & Grant Access

1st Install MySQL



$ sudo apt-get install mysql-server
$ sudo apt-get install mysql-client

CREATE USER 'ConfigDbUser1'@'localhost';

GRANT ALL ON qadbApimConfig.* TO 'ConfigDbUser1'@'localhost';

FLUSH PRIVILEGES;

MYSQL history of queries command

cat ~/.mysql_history