博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Kooboo中如何切换数据库(注意:如果切换数据库,需要Kooboo中没有一个website 否则会报错数据库中没有表之类的)...
阅读量:7247 次
发布时间:2019-06-29

本文共 3978 字,大约阅读时间需要 13 分钟。

Setup database provider

来自Kooboo document
 

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

provider is a relational database similar with . 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:

  • 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:

  • "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.
 
Server=.\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;
Sample
Server=.\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;
true
Server=.\SQLExpress;Database=Kooboo_CMS; Trusted_Connection=Yes;

MySQL

MySQL provider usually used on MONO/*UNIX, and some shared web hosting do not support SQLServer.

Usage:

  • "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.
 
Server=127.0.0.1;Database=Kooboo_CMS;Uid=root;Pwd=;charset=gbk;
utf8

MangoDB

is a key-value database. It usually used in the site have a lot document but have few relations.

Usage:

  • "Content_Providers.zip".
  • Extract the zip file. Copy the files under "MySQL" include "MongoDB.config" into BIN folder of Kooboo CMS.
  • the Mongodb server.
  • Edit the "MongoDB.config" to specify the connection strings.
 
mongodb://localhost
false

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:

  1. Exporting the site from the old instance.
  2. a new "Kooboo_CMS.zip".
  3. Extract the "Kooboo_CMS.zip", doing some .
  4. Setup the new web site on IIS.
  5. Start the new web site, and importing the exported site.

转载地址:http://dynbm.baihongyu.com/

你可能感兴趣的文章
vCenter Server Appliance 6.5 中重置丢失或忘记的 root 密码
查看>>
教育行业-班班通应用案例
查看>>
Linux SSH管理用户登录
查看>>
LAMP
查看>>
sendmail,mail,fetion,页面声音实现nagios报警
查看>>
硬链接和软连接
查看>>
nautilus can't be used now,due to an unexpected error解决方法
查看>>
《PHP经典实例(第二版)》(PHP Cookbook, 2nd Edition)中文版,高清扫描版[PDF]
查看>>
Spark On Yarn实战
查看>>
H3C设备与中兴89系列交换机snmp V3配置模板与kali snmpwalk配套测试
查看>>
Python编码问题
查看>>
×××LNMP环境
查看>>
linux 内核代码构架图
查看>>
FTP文件服务器搭建与应用
查看>>
openssl rand 指令解析
查看>>
ubuntu下minicom超级终端的使用方法
查看>>
迅为iTOP-4412核心板调整电压
查看>>
求两个数的最大公约数(辗转相除法)
查看>>
Linux 中gdb调试工具的使用
查看>>
设计模式系列 - 策略模式
查看>>