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

AI Hentai Generator
Generate AI Hentai for free.

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



In MySQL database, the relationship between the user and the database is defined by permissions and tables. The user has a username and password to access the database. Permissions are granted through the GRANT command, while the table is created by the CREATE TABLE command. To establish a relationship between a user and a database, you need to create a database, create a user, and then grant permissions.

Data Integration Simplification: AmazonRDSMySQL and Redshift's zero ETL integration Efficient data integration is at the heart of a data-driven organization. Traditional ETL (extract, convert, load) processes are complex and time-consuming, especially when integrating databases (such as AmazonRDSMySQL) with data warehouses (such as Redshift). However, AWS provides zero ETL integration solutions that have completely changed this situation, providing a simplified, near-real-time solution for data migration from RDSMySQL to Redshift. This article will dive into RDSMySQL zero ETL integration with Redshift, explaining how it works and the advantages it brings to data engineers and developers.

To fill in the MySQL username and password: 1. Determine the username and password; 2. Connect to the database; 3. Use the username and password to execute queries and commands.

1. Use the correct index to speed up data retrieval by reducing the amount of data scanned select*frommployeeswherelast_name='smith'; if you look up a column of a table multiple times, create an index for that column. If you or your app needs data from multiple columns according to the criteria, create a composite index 2. Avoid select * only those required columns, if you select all unwanted columns, this will only consume more server memory and cause the server to slow down at high load or frequency times For example, your table contains columns such as created_at and updated_at and timestamps, and then avoid selecting * because they do not require inefficient query se

MySQL is suitable for beginners because it is simple to install, powerful and easy to manage data. 1. Simple installation and configuration, suitable for a variety of operating systems. 2. Support basic operations such as creating databases and tables, inserting, querying, updating and deleting data. 3. Provide advanced functions such as JOIN operations and subqueries. 4. Performance can be improved through indexing, query optimization and table partitioning. 5. Support backup, recovery and security measures to ensure data security and consistency.

MySQL database performance optimization guide In resource-intensive applications, MySQL database plays a crucial role and is responsible for managing massive transactions. However, as the scale of application expands, database performance bottlenecks often become a constraint. This article will explore a series of effective MySQL performance optimization strategies to ensure that your application remains efficient and responsive under high loads. We will combine actual cases to explain in-depth key technologies such as indexing, query optimization, database design and caching. 1. Database architecture design and optimized database architecture is the cornerstone of MySQL performance optimization. Here are some core principles: Selecting the right data type and selecting the smallest data type that meets the needs can not only save storage space, but also improve data processing speed.

View the MySQL database with the following command: Connect to the server: mysql -u Username -p Password Run SHOW DATABASES; Command to get all existing databases Select database: USE database name; View table: SHOW TABLES; View table structure: DESCRIBE table name; View data: SELECT * FROM table name;

Navicat itself does not store the database password, and can only retrieve the encrypted password. Solution: 1. Check the password manager; 2. Check Navicat's "Remember Password" function; 3. Reset the database password; 4. Contact the database administrator.
