<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Martin,<span style="color: rgb(51, 51, 51); font-family: 'Segoe UI', 'Segoe WP', 'Segoe UI WPC', Tahoma, Arial, sans-serif; font-size: 17px; white-space: nowrap; background-color: rgb(255, 255, 255);">Paul</span>​<br>
</p>
<p><br>
</p>
<p>Thanks for the Quicker reponse.<br>
</p>
<p><br>
</p>
<p>The below mentioned steps worked for me.Thanks for your help.<br>
</p>
<p><br>
</p>
<p>I want help in the following things.<br>
</p>
<p><br>
</p>
<p>1-Initially i have created the H2 DB and created few users ,roles and connectors.Now if iam migrating to MYSQL how can i migrated the complete H2DB to mysql DB so that all my data will be restored.<br>
</p>
<p><br>
</p>
<p>Thanks in advance for the suggestion<br>
</p>
<p><br>
</p>
<p>Thanks<br>
</p>
<p>Saichandra<br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Martin Devecka <martin.devecka@evolveum.com><br>
<b>Sent:</b> 13 August 2014 13:18<br>
<b>To:</b> Sai Chandra; midpoint-dev@lists.evolveum.com<br>
<b>Subject:</b> Re: [Midpoint-dev] Need help in config MYSQL DB</font>
<div> </div>
</div>
<div>Hi,<br>
<br>
it seems we have lack in the documentation, thank you for reporting it. We are going to improve the documentation, however in the meantime following simple how to would probably help.<br>
We assume you have followed <a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Repository+Configuration">
https://wiki.evolveum.com/display/midPoint/Repository+Configuration</a> and <a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/MySQL">
https://wiki.evolveum.com/display/midPoint/MySQL</a><br>
<br>
First of all you should shutdown your tomcat (if it is in running state).<br>
<br>
This guide is for Windows environment, but it is very similar for Linux.<br>
<br>
1. Check ${midpoint-home}/config.xml, where MySQL (H2 has to be commented out) repository configuration is following:<br>
    <repository><br>
            <repositoryServiceFactoryClass>com.evolveum.midpoint.repo.sql.SqlRepositoryFactory</repositoryServiceFactoryClass><br>
        <embedded>false</embedded><br>
        <driverClassName>com.mysql.jdbc.Driver</driverClassName><br>
        <jdbcUsername>midpoint</jdbcUsername><br>
        <jdbcPassword>password</jdbcPassword><br>
        <jdbcUrl>jdbc:mysql://localhost:3306/midpoint</jdbcUrl><br>
        <hibernateDialect>com.evolveum.midpoint.repo.sql.util.MidPointMySQLDialect</hibernateDialect><br>
        <hibernateHbm2ddl>validate</hibernateHbm2ddl><br>
    </repository><br>
<br>
    Please update the property values according to your environment.<br>
<br>
2. On classpath either in deployed midpoint webapps/midPoint/WEB-INF/lib or in apache-tomcat/lib proper MySQL driver shall be placed. In my case: mysql-connector-java-5.1.30-bin.jar<br>
   If you are missing it, please, follow the instruction in our wiki to download and copy it.<br>
<br>
3. Check catalina.bat in apache-tomcat/bin to point to correct midpoint home location (Please set your own path):<br>
    set JAVA_OPTS=%JAVA_OPTS% -Dmidpoint.home=c:/midpoint_3_Node2 -XX:MaxPermSize=1024m<br>
<br>
4. In MySQL (I am using workbench) create midpoint database:<br>
<br>
    CREATE DATABASE IF NOT EXISTS midpoint CHARACTER SET utf8 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin DEFAULT COLLATE utf8_bin;<br>
    CREATE USER 'midpoint'@'localhost' IDENTIFIED BY 'password';<br>
    GRANT ALL on midpoint.* TO 'midpoint'@'localhost';<br>
    use midpoint;<br>
<br>
    and all the DB objects (tables) that are in the midpoint mysql script.<br>
<br>
    ...<br>
    CREATE TABLE ...<br>
    ...<br>
<br>
    Use proper sql script based on the distribution your are using either stable or snapshot:<br>
    For stable release check:<br>
    - the latest midpoint <a class="moz-txt-link-freetext" href="http://www.evolveum.com/downloads/midpoint/3.0/">
http://www.evolveum.com/downloads/midpoint/3.0/</a><br>
    - and download midpoint-3.0-dist.zip<br>
    - Execute MySQL database script located in: *\midpoint-3.0-dist.zip\config\sql\midpoint\3.0\mysql\mysql-3.0<br>
    For snapshot check:<br>
    - the latest commit number on <a class="moz-txt-link-freetext" href="https://bamboo.evolveum.com/browse/MID-TRUNK/latestSuccessful">
https://bamboo.evolveum.com/browse/MID-TRUNK/latestSuccessful</a><br>
    - and download it via <a class="moz-txt-link-freetext" href="http://athena.evolveum.com/builds/master/">
http://athena.evolveum.com/builds/master/</a> where .zip file should be selected (midpoint-3.1-SNAPSHOT-dist.zip).<br>
    - Execute MySQL database script located in: *\midpoint-3.1-SNAPSHOT-dist.zip\config\sql\midpoint\3.0\mysql\mysql-3.0<br>
    <br>
5. Start tomcat (Windows) apache-tomcat\bin\startup.bat (for Linux apache-tomcat\bin\startup.sh).<br>
6. Open browser <a class="moz-txt-link-freetext" href="http://localhost:8080/midpoint/admin/">
http://localhost:8080/midpoint/admin/</a> Login:administrator Pass:5ecr3t<br>
7. Create new user in midpoint.<br>
8. Check in MySQL table m_user where new user should be created: select * from m_user;<br>
<br>
I hope this will help you.<br>
<br>
regards,<br>
Martin Devecka<br>
<br>
<div class="moz-cite-prefix">Dňa 12.8.2014 18:00 Sai Chandra wrote / napísal(a):<br>
</div>
<blockquote type="cite"><style type="text/css" style="">
<!--
p
        {margin-top:0px;
        margin-bottom:0px}
-->
</style>
<p>Hi Team,<br>
</p>
<p><br>
</p>
<p>Can someone give me a breif idea how can i change the h2 database to my sql database.I have followed the steps mentioned in the Wiki evoleum,but it didnt help me.I have created a user and role in the midpoint but the data is not getting updated in the MYSQL
 DB,and also i have not found any errors in the logs.​A quick response is highly appreciable.<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p>Thanks<br>
</p>
<p>Saichandra<br>
</p>
This message contains information that may be privileged or confidential and is the property of ILANTUS Technologies. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain,
 copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre>_______________________________________________
midPoint-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint-dev@lists.evolveum.com">midPoint-dev@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint-dev">http://lists.evolveum.com/mailman/listinfo/midpoint-dev</a>
</pre>
</blockquote>
<br>
This message contains information that may be privileged or confidential and is the property of ILANTUS Technologies. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain,
 copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
</div>
</div>
This message contains information that may be privileged or confidential and is the property of ILANTUS Technologies. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain,
 copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
</body>
</html>