Notes for switching the application system to mysql

Source: Internet
Author: User

Mysql databases are simple and easy to use. More and more small application systems choose mysql databases, even though mysql is free of charge.
Mysql installation: Take for window as an example:
Expand the installation file and execute the installation:
Run install. bat after mysql-5.1.6-alpha-win32(4248).zip.


After the installation is complete, start the mysql service in windows, control panel, and service.

 

Install the mysql client again, similar to plsqldev, but much worse than plsqldev.
Use the sqlyog604.exe client;
Navicat_for_MySQL_10.0.5.0_XiaZaiBa.exe.


Then, convert the SQL statement used to create the table structure of the application system to mysql. Common field types are supported.
Take eworkflow custom workflow system + eform custom form system as an example
Table Structure Conversion: converts a table structure from sqlserver to mysql.
Int, char, varchar, datetime, etc.
Only ntext needs to be converted to longtext type

The converted table creation SQL statement is in the following format:


Definition syntax of the table primary key, which is different from other statements.

Create a database in mysql and execute the converted table structure.


When developing an application system as a product, we should consider the support for multiple data sources at the beginning of the design. This minimizes or even reaches the cost of database switchover. It manages and uses a database, and the switchover is complete.
APIs are reserved in the eworkflow workflow + eform. In the configuration file fcconfig. xml of the database link, configure the ds database link, as shown in figure

Copy the mysql driver package to the corresponding directory of the system.

Configure the mysql implementation factory class in fcworkflow. xml. Each type of database can have its own implementation class. because mysql is a standard SQL with few special features, JDBCWorkflowFactory is used as the implementation class.
The date implementation functions are different in many databases. The mysql function for obtaining the system date is now (). Note that you should replace this function with the original one.

Configure the Provider implementation class of the User System in fcuser. xml to make the type of key = "mysql" consistent with the value set for the first ds dbType in the fcconfig. xml file.


After the configuration is complete, you can start the test.

 

From webreport

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.