Kooboo中如何切换数据库(注意:如果切换数据库,需要Kooboo中没有一个website 否则会报错数据库中没有表之类的)
Setup database provider
Kooboo CMS can almost support all the types of database, include the relational database and No-SQL database. Right now, we have implemented five types database provider for text content: XML, SQLCe, SQLServer, MySQL and MongoDB.
XML
The xml provider is a configure-less, structure-less and simplest provider. It is the default provider include in the default release package.
The xml provider is also used on the site exporting/importing function. When exporting one site from the Kooboo CMS with non-default providers, the site will be exported as a site package using the default providers. When the site package being to import into a Kooboo CMS instance with non-default providers, it will convert the xml data into the specific database.
Highly recommended used in the development, do not used in the production.
SQLCe
SQLCe provider is a relational database similar with SQLite. It is configure-less but have structure tables. Every sites in the same Kooboo CMS instance will has its owner standalone database file. It usually use in the site which each table with less than 50000 rows data.
All the relational database[SQLCe,SQLServer, Mysql] have the same characteristic is they will always the dynamic tables for each content type, but it transparent to the users.
Usage:
- Download the Content_Providers.zip.
- Copy the files under "SQLCe" into the BIN folder of Kooboo CMS.
SQLServer
SQLServer provider have two modes:
- Standalone mode. Each site will have its database file. In this mode, the user have to provide the "CreateDatabaseSetting" connection string which have create database permission. The site will using the connection setting in the "Connections" section.
- Shared mode. All the sites in the same instance will use the same database. In this mode, the user have to set "SharingDatabase" as "True", set the "SharingDatabaseConnectionString".
Usage:
- Download "Content_Providers.zip".
- Extract the zip file. Copy the files under "SQLServer" include "SQLServer.config" into BIN folder of Kooboo CMS..
- Create a new database or use the existing database, we call it "Kooboo CMS".
- Edit the "SQLServer.config" to specify the connection strings.
<SqlServerSettings xmlns="http://schemas.datacontract.org/2004/07/Kooboo.CMS.Content.Persistence.SqlServer" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Connections>
<ConnectionSetting>
<ConnectionString>Server=.\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;</ConnectionString>
<Name>Sample</Name>
</ConnectionSetting>
</Connections>
<CreateDatabaseSetting>Server=.\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;</CreateDatabaseSetting>
<SharingDatabase>true</SharingDatabase>
<SharingDatabaseConnectionString>Server=.\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;</SharingDatabaseConnectionString>
</SqlServerSettings>
MySQL
MySQL provider usually used on MONO/*UNIX, and some shared web hosting do not support SQLServer.
Usage:
- Download "Content_Providers.zip".
- Extract the zip file. Copy the files under "MySQL" include "MySQL.config" into BIN folder of Kooboo CMS..
- Create a new database or use the existing database, we call it "Kooboo CMS".
- Edit the "MySQL.config" to specify the connection strings.
<MysqlSettings xmlns="http://schemas.datacontract.org/2004/07/Kooboo.CMS.Content.Persistence.Mysql" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ConnectionString>Server=127.0.0.1;Database=Kooboo_CMS;Uid=root;Pwd=;charset=gbk;</ConnectionString>
<DEFAULT_CHARSET>utf8</DEFAULT_CHARSET>
</MysqlSettings>
MangoDB
MangoDB is a key-value database. It usually used in the site have a lot document but have few relations.
Usage:
- Download "Content_Providers.zip".
- Extract the zip file. Copy the files under "MySQL" include "MongoDB.config" into BIN folder of Kooboo CMS.
- Install the Mongodb server.
- Edit the "MongoDB.config" to specify the connection strings.
<DatabaseSettings xmlns="http://schemas.datacontract.org/2004/07/Kooboo.CMS.Content.Persistence.MongoDB" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<ConnectionString>mongodb://localhost</ConnectionString>
<SharingDatabase>false</SharingDatabase>
</DatabaseSettings>
Site migration between different Kooboo CMS instance with different providers
Migrating the site between different Kooboo CMS instances is a really great feature. For example: We can develop the site under the XML provider instance, but want to deploy the to another production instance with SQLServer.
Usage:
- Exporting the site from the old instance.
- Download a new "Kooboo_CMS.zip".
- Extract the "Kooboo_CMS.zip", doing some Configurations.
- Setup the new web site on IIS.
- Start the new web site, and importing the exported site.
Kooboo中如何切换数据库(注意:如果切换数据库,需要Kooboo中没有一个website 否则会报错数据库中没有表之类的)的更多相关文章
- eclipse java项目中明明引入了jar包 为什么项目启动的时候不能找到jar包 项目中已经 引入了 com.branchitech.app 包 ,但时tomcat启动的时候还是报错? java.lang.ClassNotFoundException: com.branchitech.app.startup.AppStartupContextListener java.lang.ClassN
eclipse java项目中明明引入了jar包 为什么项目启动的时候不能找到jar包 项目中已经 引入了 com.branchitech.app 包 ,但时tomcat启动的时候还是报错?java. ...
- 数据库迁移(创建关联等操作) Target database is not up to date报错
使用Mysql-sqlalchemy执行数据库迁移 来更新数据库: 队长试探性的在网上找了几种方案 依然没有解决报错问题: 后来看了https://www.aliyun.com/jiaocheng/4 ...
- angular6项目中使用echarts图表的方法(有一个坑,引用报错)
1.安装相关依赖(采用的webpack) npm install ecahrts --save npm install ngx-echarts --save 2.angular.json 配置echa ...
- Working Experience - WPF XAML 报错 - 命名空间中不存在该名称
问题 编辑 xaml 时,VS 提示一个存在的类不存在(如:命名空间"xxx"中不存在"xxx"名称). 运行环境 Windows 版本:Window 10 V ...
- python3.3中使用tornado.options.parse_config_file的时候,在windows下conf为utf-8时,报错的问题
由于我的windows7下的默认编码是gbk 在调用tornado.options.parse_config_file时,内部代码为 with open(path) as f: exec_in(f.r ...
- Couldn't load libPassword from loader:NDK开发中C文件编译成cpu对应的so类库时,找不到类库报错的原因之一
LogCat输出: 03-03 12:42:32.665: E/AndroidRuntime(32432): FATAL EXCEPTION: main03-03 12:42:32.665: E/An ...
- number (1)eclipse 连接数据库报错 数据库信息不对导致的出错
- JAVA 报错exe4j中this executable was created with an evaluation 怎么办
如果使用未破解注册的exe4j打包JAR文件为EXE,运行EXE的时候就会出现下面的提示 打开exe4j软件,Change License或者是输入序列号,然后用注册机算一个注册码即可
- python 使用xlsxwriter 写入数据时,当数据中链接的后面包含空格时(如:"http://*** "),导出问题打开报错
python 在使用 xlsxwriter组件写入数据时,当数据包含类似“http://*** /”数据时,导出的excel,打开时会提示如下错误: 没有查到相关的资料处理这个问题,可能原因为exce ...
随机推荐
- define中的:#,##,#@
[define中的:#,##,#@] #define Conn(x,y) x##y #define ToChar(x) #@x #define ToString(x) #x (2)x##y表示什么?表 ...
- DJANGO中filter_horizontal和raw_id_fields的作用
在作多项选择的操作方便性,及单项选择太多时,会有好一点的体验... class UserAuthorAdmin(admin.ModelAdmin): # raw_id_fields = ('group ...
- [java线段树]2015上海邀请赛 D Doom
题意:n个数 m个询问 每个询问[l, r]的和, 再把[l, r]之间所有的数变为平方(模为9223372034707292160LL) 很明显的线段树 看到这个模(LLONG_MAX为922337 ...
- POJ2533——Longest Ordered Subsequence(简单的DP)
Longest Ordered Subsequence DescriptionA numeric sequence of ai is ordered if a1 < a2 < ... &l ...
- WCF的通信
[ServiceContract] public interface IContractDemoOne { [OperationContract(IsOneWay=true) ...
- HDU1054Strategic Game(最小顶点覆盖数)
我们来先了解一下什么是最小顶点覆盖: 图G的顶点覆盖是一个顶点集合V,使得G中的每一条边都接触V中的至少一个顶点.我们称集合V覆盖了G的边.最小顶点覆盖是用最少的顶点来覆盖所有的边.顶点覆盖数是最小顶 ...
- eclipse myeclipse zend studio 中去掉双引号中的斜体
去windows/preferences 菜单里,选Web/JSP Files/Editor/Syntax Coloring 在右边选Attribute Values ,把Italic的钩去掉就好了.
- android 电容屏(三):驱动调试之驱动程序分析篇
平台信息: 内核:linux3.4.39系统:android4.4 平台:S5P4418(cortex a9) 作者:瘋耔(欢迎转载,请注明作者) 欢迎指正错误,共同学习.共同进步!! 关注博主新浪博 ...
- Java面试题-并发框架
1. SynchronizedMap和ConcurrentHashMap有什么区别? 答:java5中新增了ConcurrentMap接口和它的一个实现类ConcurrentHashMap.Conc ...
- POJ 2586 Y2K Accounting Bug(贪心)
题目连接:http://poj.org/problem?id=2586 题意:次(1-5.2-6.3-7.4-8.5-9.6-10.7-11.8-12),次统计的结果全部是亏空(盈利-亏空<0) ...