[Midpoint-dev] Need help in config MYSQL DB
Martin Devecka
martin.devecka at evolveum.com
Wed Aug 13 09:48:25 CEST 2014
Hi,
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.
We assume you have followed
https://wiki.evolveum.com/display/midPoint/Repository+Configuration and
https://wiki.evolveum.com/display/midPoint/MySQL
First of all you should shutdown your tomcat (if it is in running state).
This guide is for Windows environment, but it is very similar for Linux.
1. Check ${midpoint-home}/config.xml, where MySQL (H2 has to be
commented out) repository configuration is following:
<repository>
<repositoryServiceFactoryClass>com.evolveum.midpoint.repo.sql.SqlRepositoryFactory</repositoryServiceFactoryClass>
<embedded>false</embedded>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<jdbcUsername>midpoint</jdbcUsername>
<jdbcPassword>password</jdbcPassword>
<jdbcUrl>jdbc:mysql://localhost:3306/midpoint</jdbcUrl>
<hibernateDialect>com.evolveum.midpoint.repo.sql.util.MidPointMySQLDialect</hibernateDialect>
<hibernateHbm2ddl>validate</hibernateHbm2ddl>
</repository>
Please update the property values according to your environment.
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
If you are missing it, please, follow the instruction in our wiki to
download and copy it.
3. Check catalina.bat in apache-tomcat/bin to point to correct midpoint
home location (Please set your own path):
set JAVA_OPTS=%JAVA_OPTS% -Dmidpoint.home=c:/midpoint_3_Node2
-XX:MaxPermSize=1024m
4. In MySQL (I am using workbench) create midpoint database:
CREATE DATABASE IF NOT EXISTS midpoint CHARACTER SET utf8 DEFAULT
CHARACTER SET utf8 COLLATE utf8_bin DEFAULT COLLATE utf8_bin;
CREATE USER 'midpoint'@'localhost' IDENTIFIED BY 'password';
GRANT ALL on midpoint.* TO 'midpoint'@'localhost';
use midpoint;
and all the DB objects (tables) that are in the midpoint mysql script.
...
CREATE TABLE ...
...
Use proper sql script based on the distribution your are using
either stable or snapshot:
For stable release check:
- the latest midpoint http://www.evolveum.com/downloads/midpoint/3.0/
- and download midpoint-3.0-dist.zip
- Execute MySQL database script located in:
*\midpoint-3.0-dist.zip\config\sql\midpoint\3.0\mysql\mysql-3.0
For snapshot check:
- the latest commit number on
https://bamboo.evolveum.com/browse/MID-TRUNK/latestSuccessful
- and download it via http://athena.evolveum.com/builds/master/
where .zip file should be selected (midpoint-3.1-SNAPSHOT-dist.zip).
- Execute MySQL database script located in:
*\midpoint-3.1-SNAPSHOT-dist.zip\config\sql\midpoint\3.0\mysql\mysql-3.0
5. Start tomcat (Windows) apache-tomcat\bin\startup.bat (for Linux
apache-tomcat\bin\startup.sh).
6. Open browser http://localhost:8080/midpoint/admin/
Login:administrator Pass:5ecr3t
7. Create new user in midpoint.
8. Check in MySQL table m_user where new user should be created: select
* from m_user;
I hope this will help you.
regards,
Martin Devecka
Dn(a 12.8.2014 18:00 Sai Chandra wrote / napísal(a):
>
> Hi Team,
>
>
> 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.
>
>
>
> Thanks
>
> Saichandra
>
> 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.
>
>
> _______________________________________________
> midPoint-dev mailing list
> midPoint-dev at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolveum.com/pipermail/midpoint-dev/attachments/20140813/d98e68f3/attachment.html>
More information about the midPoint-dev
mailing list