[Building Sakai] Switching from HSQLDB to MySQL
Anthony Whyte
arwhyte at umich.edu
Wed Apr 28 09:37:06 PDT 2010
To confirm, your sakai.properties looks like this (with HSQLDB commented out):
e.g., for MySQL 5.0
# Let Sakai generate database objects on startup.
# Default = true.
auto.ddl=true
# The username and password. Change to match your setup.
username at javax.sql.BaseDataSource=sakaiuser
password at javax.sql.BaseDataSource=guessme
## MySQL settings - make sure to alter as appropriate
vendor at org.sakaiproject.db.api.SqlService=mysql
driverClassName at javax.sql.BaseDataSource=com.mysql.jdbc.Driver
hibernate.dialect=org.hibernate.dialect.MySQLDialect
url at javax.sql.BaseDataSource=jdbc:mysql://127.0.0.1:3306/sakai?useUnicode=true&characterEncoding=UTF-8
validationQuery at javax.sql.BaseDataSource=select 1 from DUAL
defaultTransactionIsolationString at javax.sql.BaseDataSource=TRANSACTION_READ_COMMITTED
Did you put your MySQL connector/j jar in $CATALINA_HOME/common/lib ? Also what version are you using?
On a side note, I recommend upgrading your version of Maven to at least 2.0.10 (the minimum we require). I run 2.2.1.
Cheers,
Anthony
On Apr 28, 2010, at 12:04 PM, Matthew Sharrer wrote:
> I've built Sakai, and I can get the demo to work running off of memory with HSQLDB.
>
> This is my environment:
> java version "1.5.0_22"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_22-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_22-b03, mixed mode, sharing)
>
> Apache Tomcat 5.5.29
>
> Maven version: 2.0.8
> Java version: 1.5.0_22
> OS name: "linux" version: "2.6.18-164.el5" arch: "i386" Family: "unix"
>
> I've also set all the needed environment variables.
>
> The builds went alright, and like I said, I could login to Sakai when I was running off of memory.
>
> I attempted to switch to MySQL and I'm having no luck. I'm using version 5.0.77. I added a group and user for mysql, and set up environment variables. I was able to start up mysql, and I created the sakai database with the default character set utf8. I then typed the following:
> grant all on sakai.* to sakaiuser@'localhost' identified by 'sakaipassword';
> grant all on sakai.* to sakaiuser@'127.0.0.1' identified by 'sakaipassword';
> flush privileges;
>
> I've installed the mysql JDBC driver.
>
> I created a my.cnf file in /etc:
> [mysqld]
> default-storage-engine=InnoDB
> Innodb_data_home_dir=/usr/local/mysql/data
> Innotdb_data_file_path=ibdata1:10M:autoextend
> Innodb_flush_log_at_trx_commit=1
>
> I edited teh sakai.properties file in $CATALINA_HOME/sakai:
> username at javax.sql.BaseDataSource=sakaiuser
> password at javax.sql.BaseDataSource=sakaipassword
>
> And I commented out the HSQLDB settings while uncommenting the mysql settings.
>
> I don't know what else to do. I feel like I followed the configuration instructions, but perhaps I'm missing something.
>
> If anyone can provide assistance, I'd greatly appreciate it. I can post logs, but I didn't want to post too much information at once.
>
>
>
> _______________________________________________
> 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"
More information about the sakai-dev
mailing list