[
https://issues.apache.org/jira/browse/FELIX-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868034#action_12868034
]
Christian Müller commented on FELIX-2280:
-----------------------------------------
About your question to the MySQL grant privileges (I hope i understood it
correct):
To create a new user in MySQL, you could connect to the database with an
existing user which has sufficient rights and execute the following commands:
{code}
CREATE USER 'karaf'@'%' IDENTIFIED BY 'password';
{code}
This creates the new user 'karaf' with the password 'password'. This user can
access the database from every host (because of the '%' sign). Instead of '%',
you could also write explicitly the host name or IP address from which you
allow to access this database. Than you have to execute the create statement
for each host/IP address.
After creating the user, you have to grant the following rights:
{code}
GRANT SELECT, INSERT, UPDATE, CREATE, LOCK TABLES ON *.* TO 'karaf'@'%';
{code}
To execute the unit tests, the database user also needs the 'DROP' privileges!
You could also grant the privileges on a finer lever. Instead to grant on
'*.*', you could also grant on specific schemata or tables.
See also http://dev.mysql.com/doc/refman/5.1/en/adding-users.html
Cheers,
Christian
> To much code duplication in DefaultJDBCLock, OracleJDBCLock and MySQLJDBCLock
> -----------------------------------------------------------------------------
>
> Key: FELIX-2280
> URL: https://issues.apache.org/jira/browse/FELIX-2280
> Project: Felix
> Issue Type: Improvement
> Components: Karaf
> Affects Versions: karaf-1.4.0
> Environment: All
> Reporter: Christian Müller
> Assignee: Jamie goodyear
> Attachments: FELIX-2280.patch, FELIX-2280.patch, FELIX-2280.patch,
> FELIX-2280.patch
>
>
> org.apache.felix.karaf.main.DefaultJDBCLock,
> org.apache.felix.karaf.main.MySQLJDBCLock and
> org.apache.felix.karaf.main.OracleJDBCLock has to much code duplications. I
> propose a solution like in ActiveMQ [package
> org.apache.activemq.store.jdbc.adapter|http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/].
> And we should implement some unit tests for it.
> If it's fine for you, I will try to improve this part of karaf and provide a
> patch for it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.