Summary of using MySQL on the LJMM platform (Linux + Jexus + MySQL + mono) _ MySQL

Source: Internet
Author: User
Tags apache php
Summary of using MySQL on LJMM platform (Linux + Jexus + MySQL + mono) bitsCN.com

Prepare PDF files. NET Framework open-source project "supermarket management system" is transplanted to Linux to run (demonstration address: http: // 221.123.142.196), using the Jexus server and MySQL database, compared with SQLite, mySQL has many problems, but is finally solved one by one. The following is a summary:

1. MySQL driver:

Some people say that running MySQL under mono requires the MySQL driver of the old node. I found that it has nothing to do with it. I used the MySQL driver. data. the dll version is 6.3.6 and runs in mono 3.0.3.

2. MySQL service version:

This is a bit of a relationship. I tested two MySQL service versions, one 5.0.95 and the other 5.5.28. when the former has an error, I found that there was no problem when I switched to the latter database, it seems that the version is high.

3. MySQL encoding problems:


To use Chinese, all language settings in the database are either UTF-8 or encoding in the connection string (CharSet = utf8 ):

---------
Server = ip; User Id = uid; password = pwd; CharSet = utf8; DataBase = SuperMarket; Allow Zero Datetime = True
----------


4. MySQL date field type:

In fact, this problem is related to the website's "language and culture settings". When splicing SQL statements, DateTime is used directly. the ToString () format is different, and the MySQL language and culture settings are different from those of the website.
In addition, sometimes the date field only saves the date part, does not save the time part, or the time and date field is empty, which may cause a query error, you can add the "Allow Zero Datetime = True" setting to the connection string.
The best solution is to use the parameter query of Ado.net.
PS: OQL in the PDF. NET Framework. all data controls are parameterized for query.

5. Language and Culture settings in the Web. config file:

Because mono 3.0.x is not yet in the official version, its ASP.. NET supports only en-US language and culture settings of the current system, such as zn-CH by default, but not the framework, therefore, MySQL does not know the current settings and reports an error.
The specific setting method is in

  
  ... ...
 

Or another solution is to use mono 2.10.8.

6. MySQL data management:

You can use Apache PhpAdmin to manage MySQL, but you have to install apache PHP runtime. Here we recommend a database management software in CS mode, PDF.. NET integrated development tools to facilitate MySQL management and perform database creation and other operations.

(Tool: http://ft.codeplex.com/releases/view/65308)

BitsCN.com

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.