MySQL数据库出现N多问题的原因
以下的文章介绍的是用MySQL数据库出现N多问题,我们大家都知道系统用 access数据库,没有任何的问题出现,但是随着数据量不断的增加,其相关性能下降的很快,但是最起码,没有错。 后台考虑到未来发展,转移到MySQL数据库平台,结果一下子就出现了一堆问题。
以下的文章介绍的是用MySQL数据库出现N多问题,我们大家都知道系统用 access数据库,没有任何的问题出现,但是随着数据量不断的增加,其相关性能下降的很快,但是最起码,没有错。
后台考虑到未来发展,转移到MySQL数据库平台,结果一下子就出现了一堆问题。
1. 中文字符不支持。
这个就够我忙几个小时了,又是修改my.ini,又是修改链接字符串。总算搞好了。
2. 插入时间格式不支持
简直吐血了。在c#里,日期含有中文“上午”“下午”,由于MySQL修改支持了中文,插入的时候直接报错了。
这种低级的问题超级吐血,只好在持久层自己添加一个转换。
3. 插入的中文突然丢失了一般
测试的时候,突然发现插入的中文没了一般,英文正常,字段类型是Text。再次吐血,找不到方法之后,最后只好重建MySQL数据库。
4. 插入BLOb,图片错误。
如果是字符转化为byte[],没有问题,如果是文件之类的就错。估计还是中文字符问题。
只能再次修改持久层,对byte[]进行base64加密。
吐血中!!!!!
5. 这次竟然是官方代码抛的异常!!!!我靠!!!老大,这个是谁写的啊!
TABLENAME:POS_SALESORDER
LOG:System.ArgumentOutOfRangeException: 索引和长度必须引用该字符串内的位置。
参数名: length
在 System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
在 MySQL.Data.Types.MySQLString.MySQL.Data.Types.IMySQLValue.WriteValue(MySQLStream stream, Boolean binary, Object val, Int32 length)
在 MySQL.Data.MySQLClient.MySQLParameter.Serialize(MySQLStream stream, Boolean binary)
在 MySQL.Data.MySQLClient.Statement.SerializeParameter(MySQLParameterCollection parameters, MySQLStream stream, String parmName)
在 MySQL.Data.MySQLClient.Statement.BindParameters()
在 MySQL.Data.MySQLClient.PreparableStatement.Execute()
在 MySQL.Data.MySQLClient.MySQLCommand.ExecuteReader(CommandBehavior behavior)
在 MySQL.Data.MySQLClient.MySQLCommand.ExecuteNonQuery()
在 Pixysoft.Framework.Noebe.NoebeCommand.Execute()
救命啊。。什么原因!!!这次连debug都没有办法了。
我估计还有无数的问题在等着我。
开源啊开源,不是我刻意说你。也摆脱你争气点。我做软件也5年多,用.net从来不会被小问题阻碍,可以专心研究算法、框架。可是一搞java,一搞开源的,就无数的小问题。
比如hibernate, tmd,竟然版本升级了,连namespace都变了。 这可以说,直接使网上数以百万计的hibernate demo code, helloworld变成费码。对于初学者,这是多么沉重的打击。
比如eclipse, 无数的拥护者肯定唾骂我。但是,和vs2005比起来,我宁愿面对无数的唾骂,也要支持vs2005。eclipse是有些不错的功能,但是那个性能。。那个易用性。。。嗨。。一启动就300m内存。用个智能提示等半天假死。还有很多打包、部署、一大堆问题。不是说ant不好,可是我只是想打个包,让我写一堆xml干嘛,而且写的跟写代码一样,还分拆在不同的目录。救命。。。比看代码还累。
后来出了个所谓的maven的,说专门针对部署的,怎么怎么好。我们用起来,简直一个狗屁。只要任意一个版本变动,立刻病毒效应。立刻打包失败,而且失败的莫名其妙。我们的工程师也就1、2个人才能解决,比如修改打包配置文件版本号最后2位之类的,其他的都云里雾里。
还有java里面做界面的,不要跟我说javaswing怎么样,最后还不是IBM推出的基于c的SWT,才结束了JAVA的界面噩梦。以上的相关内容就是对用MySQL数据库相当多问题的介绍,望你能有所收获。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

Apache connects to a database requires the following steps: Install the database driver. Configure the web.xml file to create a connection pool. Create a JDBC data source and specify the connection settings. Use the JDBC API to access the database from Java code, including getting connections, creating statements, binding parameters, executing queries or updates, and processing results.

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

Laravel is a PHP framework for easy building of web applications. It provides a range of powerful features including: Installation: Install the Laravel CLI globally with Composer and create applications in the project directory. Routing: Define the relationship between the URL and the handler in routes/web.php. View: Create a view in resources/views to render the application's interface. Database Integration: Provides out-of-the-box integration with databases such as MySQL and uses migration to create and modify tables. Model and Controller: The model represents the database entity and the controller processes HTTP requests.

The key to installing MySQL elegantly is to add the official MySQL repository. The specific steps are as follows: Download the MySQL official GPG key to prevent phishing attacks. Add MySQL repository file: rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm Update yum repository cache: yum update installation MySQL: yum install mysql-server startup MySQL service: systemctl start mysqld set up booting
