[Building Sakai] MySQL UserID/PW Specification in sakai.properties

Matthew Jones jonespm at umich.edu
Thu Aug 6 11:16:52 PDT 2009


The username sa is the default password set for this
javax.sql.BaseDataSource bean in the 2.6 kernel (db-components.xml). You'd
have to recompile the kernel to actually change these there.

        <!-- The connection username to be passed to our JDBC driver to
establish a connection. -->
        <property name="username">
            <value>sa</value>
        </property>

        <!-- The connection password to be passed to our JDBC driver to
establish a connection. -->
        <property name="password">
            <value></value>
        </property>

The configuration on the Configure tab of the installation guide should be
the one that's accurate, I'm not sure where you saw the other one.
(Ref: http://confluence.sakaiproject.org/display/DOC/Sakai+2.6)

If you want to make *sure* your settings override the ones that are there
without messing with editing that file, you can use a security.properties
file. All properties in security.properties (and local.properties) will
override the settings in sakai.properties.

(Ref:
http://confluence.sakaiproject.org/display/REL/More+Flexible+Sakai+Configuration
)

You need to pass location to sakai through an environment variable. The
easiest way is to make a file in tomcat/bin called setenv.sh (setenv.bat on
windows) This is mentioned on the install guide of that above link.

-- Create bin/setenv.sh
###########
export JAVA_OPTS=-server -XX:+UseParallelGC -Xmx768m -XX:MaxPermSize=160m
-Djava.awt.headless=true -Dsakai.security=/usr/local/tomcat/security

In that directory, put a file called security.properties
-- Create /usr/local/tomcat/security/security.properties (Or whatever you
defined above)
###########
## MySQL settings - make sure to alter as appropriate
#create database sakai default character set utf8;
vendor at org.sakaiproject.db.api.SqlService=mysql
driverClassName at javax.sql.BaseDataSource=com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQLDialect
#Change sakaidbname to your database name
url at javax.sql.BaseDataSource
=jdbc:mysql://localhost:3306/sakaidbname?useUnicode=true&characterEncoding=UTF-8
validationQuery at javax.sql.BaseDataSource=select 1
defaultTransactionIsolationString at javax.sql.BaseDataSource
=TRANSACTION_READ_COMMITTED
#Set your username and password
username at javax.sql.BaseDataSource=sakaiusername
password at javax.sql.BaseDataSource=sakaipassword
#If you want auto.ddl to run
auto.ddl=true

On Thu, Aug 6, 2009 at 1:52 PM, Tony Harris <harrist at ccv.vsc.edu> wrote:

>  Hi all,
>
> I think after much wrangling I have finally gotten Sakai 2.6.x to build on
> my development server.  Had to blow away the tomcat I'd downloaded,
> uninstall any tomcat stuff that had come on the server install itself, clear
> the Maven repository, and grab a fresh copy of the source.  And then
> remember to do all the setup pieces over again that that eliminated.  Always
> built clean, but would either hang in the testing phase of the maven run, or
> would come up, but throw Java errors.  Finally past that.
>
> However, I had one oddity that cropped up in the last 2-3 builds.  I have
> the username@ and password@ specs for the MySQL database (both for
> javax.sql.DataSource and javax.sql.BaseDataSource because one set of docs
> referred to one, one to the other).  And that seemed fine, appeared based on
> the messages in catalina.out to be connecting.  But all of a sudden, without
> my changing a properties file, I started getting errors saying access was
> denied for "sa at localhost".  I rechecked the sakai.properties file,
> rechecked the docs on environment setup and MySQL setup to see if I missed
> something, and cannot see what else I need to add or change.  But it
> absolutely refused to finish startup.  Finally, since this is a development
> box, I went ahead and added an ID of "sa" with all rights to the Sakai
> database when coming in from localhost, and poof! everything started up
> fine.
>
> Can someone point me ideally at one nice handy document that spells out all
> the places I need to modify to use MySQL and all the parameters, and maybe
> give me some idea where it might be getting "sa at localhost" as a database
> login ID since I can't even find that in a properties file?
>
> Thanks!
>
> --
> Tony Harris
> Assistant CTO
> Community College of Vermont
> harrist at ccv.edu
> (802) 828-2800
>
> Dwirze ski, evarre kolex.
> (One by one droplets, eventually an ocean.)
> -------------------------------------------
> PRIVACY & CONFIDENTIALITY NOTICE: This message is for the designated
> recipient only and may contain privileged, confidential, or otherwise
> private information. If you have received it in error, please notify the
> sender immediately and delete the original. Any other use of an email
> received in error is prohibited.
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090806/851257b4/attachment.html 


More information about the sakai-dev mailing list