Use MySQL database in Sakai

Source: Internet
Author: User
Tags mysql backup

Download sakai-demo-2.6.2 from the official website, the default is the memory database hsqldb, want to use mysql.

So ......

1. How do tables, fields, and data in mysql come from? I found it on the official website. I didn't find mysql backup files, ddl files, and some Database Upgrade files. Do I need to install 2.6.2 from 1.5.

Solution 1: Download The sakai source code, search for all *. SQL files, find the database files of version 2.6.2 (files without the upgrade tag), and import the files to the database. Not recommended. The files imported in this way may not be complete, and there may be dependencies between databases. The error is very depressing. I gave up half of them anyway.

Solution 2: Convert the hsqldb database into a mysql database. This is the best because hsqldb contains all the data that sakai runs in real time, so you don't have to worry about whether the data is complete. In addition, MySQL Migration Toolkit can be directly converted with a tool, which is easy to operate... There are detailed tutorials on http://confluence.atlassian.com/display/DOC/Migrating+from+HSQLDB+to+MySQL

Note that the value of connection String in Source Database is sakai. A field in properties, such as: url@javax. SQL .BaseDataSource = jdbc: hsqldb: file :$ {sakai. home} db/sakai. db. Be sure not. the suffix is added to the db. Although you have doubts, sakai. db is not a specific file at all (yes, it is just a prefix)

2. Set sakai to load the mysql database.

Comment out url@javax. SQL .BaseDataSource = jdbc: hsqldb: file: $ {sakai. home} db/sakai. db; hsqldb. default_table_type = cached

Add the following command:

# Username@javax. SQL .BaseDataSource = sakai

# Password@javax. SQL .BaseDataSource =! @ # $ % )(*&

# Vendor@org.sakaiproject.db.api.SqlService = mysql

# DriverClassName@javax. SQL .BaseDataSource = com. mysql. jdbc. Driver

# Hibernate. dialect = org. hibernate. dialect. MySQLInnoDBDialect

# Url@javax. SQL .BaseDataSource = jdbc: mysql: // 127.0.0.1: 3306/sakai? UseUnicode = true & characterEncoding = UTF-8

# ValidationQuery@javax. SQL .BaseDataSource = select 1 from DUAL

# DefaultTransactionIsolationString@javax. SQL .BaseDataSource = TRANSACTION_READ_COMMITTED

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.