SQL bit 37-mysql error in data too long for column "' at row 1

Source: Internet
Author: User

Source: Error in SQL drip 37-mysql data too long for column "at row 1

1. mysql Service

My Computer-(right-click) management-Services and applications-service--mysql--on (stop, restart)

2. Command line mode

Windows

1. Click "Start", "Run" (shortcut key Win+r).

2. Start: Enter net stop MySQL

3. Stop: Enter net start MySQL

Hint * Redhat Linux also supports service command, boot: # service mysqld start stop: # service mysqld Stop restart: # service mysqld Restart

* Windows can not be restarted directly (restart), can only stop, then start.

3, Too many connections

2008-04-30┆379,578 views┆56,071

Error Number:1040

Problem Analysis:

The number of connections exceeds the MySQL setting value, which is related to Max_connections and wait_timeout. The larger the value of the wait_timeout, the longer the idle wait for the connection, which results in a greater number of current connections.

Workaround:

1, virtual host users please contact the space provider to optimize the configuration of MySQL server;

2, independent host users please contact the server administrator to optimize the configuration of MySQL server, can refer to:

Modify the parameters in the MySQL configuration file (under Windows My.ini, Linux for my.cnf):

    • CODE: [COPY]
    • max_connections =  +
    • Wait_timeout =  5

If you do not have the ability to add, modify and restart MySQL, if you regularly report this error, please follow the server Environment Setup tutorial Check your server

4. Parameters in the MySQL statement

Note the parameters in MySQL

$sql="UpdategsarticleSetBusinessid='$BusinessId', SolutionID='$SolutionId', ServiceId='$ServiceId', Aboutid='$AboutId', ArticleTitle='$ArticleTitle', Articlebody='$ArticleBody', Createtime=Now ()whereId='$Id'";

This eye must see clearly not be written in where id= ' @Id ' saying that this is the syntax in SQL Server, I think all the same, and here are all the arguments with a single quotation mark is why. This is a string type when you want to add a single quotation mark, the number type does not need to add.

For example: There is a field a in the data table, and his type is (int, bigint, etc.) number type
Well: a = ' 12 ' is wrong to write because the numeric type field, cannot insert or assign value of string type
If the A field is a field such as a text type, the text number can be inserted
syntax, quotation marks indicate that the supplied value is a string literal type, not an addition that is a numeric type

SQL bit 37-mysql error in data too long for column "' at row 1

Related Article

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.