Posts

Showing posts with the label MySQL

WSO2 DSS - Batch Insert Sample (end to end)

Image
WSO2 DSS wraps Data Services Layer and provides us with a simple GUI to define a Data Service with zero Java code. With this, a change to the data source is just a simple click away and no other party needs to be aware of this. With this sample demonstration, we will see how to do a batch insert to a table. Batch insert is useful when you want to insert data in sequential manner. This also means that if at least one of the insertion query fails all the other queries ran so far in the batch will be rolled back as well. If one insertion in the batch fails means whole batch is failed. This can be used if you are running the same query to insert data many times. With batch insert all the data will be sent in one call. So this reduce the number calls you have to call, to get the data inserted.  This comes with one condition that, The query should not be producing results back. (We will only be notified whether the query was successful or not.) Prerequisites:  ...

Install Liferay over a MySQL Database

Image
With this post I will share how to get started with Liferay Portal including initial configurations and login. Environment: Linux Pre-requisites : MySQL installation (Refer this post for steps to install MySQL ) Java 1.6 or above Let's download the Liferay pack from here . I got the Community Edition of bundle with Tomcat. Extract it to a folder of your choice, let's call the extracted folder LR_HOME. Ok, the resources are ready.. Let's go.. MySQL Login to MySQL. If you just installed following command will do. mysql -uroot -p Enter the password (default root). Create database to be used for Liferay. create database lportal; Create user for Liferay. create user 'lr_user'@'localhost' identified by 'user123'; Give access to the created database for this user. grant all privileges on lportal.* to 'lr_user'@'localhost' with grant option; Mysql work is over now. Let's go to Liferay. LifeRay Go...

Deploying Identity Server over a JDBC Based User Store

Image
With this post I am to demonstrate how to configure WSO2 Identity Server with a JDBC user store. For the demonstration I am using a MySQL user store, but same procedure applies to any other JDBC user store as well. My environment is, OS - Ubuntu 12.10 Java - 1.6 WSO2 IS 4.5.0 Setting up MySQL database User Store Configuration in IS - Primary User Store Configuration in IS - Secondary (I am referring to extracted wso2is folder as CARBON_HOME in this post) Setting up MySQL database We need MySQL running at first. This post will be helpful in setting up the MySQL database , if it's not already done. Once MySQL is running we have to set up the database as required by the Identity Server. The server packs the necessary sql scripts within itself, which can be located at CARBON_HOME/dbscripts.  Let's login to MySQL server and execute the following, Create a database, mysql> create database JDBC_demo_user_store; Check out the creation, mysql> sho...

Getting Started with MySQL

Image
This is a simple beginners guide to use MySQL in linux, from installation to querying the databases. Installation Login Databases and tables Installation First let's make sure our package management tools are up-to date. For that run the following commands in command line. sudo apt-get update sudo apt-get dist-upgrade Once it finishes update and upgrading, we can install MySQL with following command. sudo apt-get install mysql-server mysql-client This will take a moment to install and now we are ready to go.  Login At first start up MySQL server is not set up with a password for root and we can login with, mysql -u root -p If we are setting the password for the first time we can use following to set-up, mysqladmin -u root -p NEWPASSWORD   If we want to change a previously set password following command can be used, mysqladmin -u root -p'oldpassword' password newpassword Databases and Tables First we should login to MySQL server with, mysql ...