Download sakai-demo-2.6.2 from the official website, the default is the memory database hsqldb, want to use mysql. So hellip; 1. What are the tables, fields, and data in mysql?
Download sakai-demo-2.6.2 from the official website, the default is the memory database hsqldb, want to use mysql. So hellip; 1. What are the tables, fields, and data in mysql?
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... Detailed tutorial + from + HSQLDB + to + MySQL on the Internet
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