Character set of MySQL stored procedures _ MySQL

Source: Internet
Author: User
The character set of the MySQL stored procedure cannot be defined when a parameter is defined in the stored procedure. Therefore, when a stored procedure is called, the global variable character_set_server is read by default, in addition, only the value of the global variable at mysqld startup is read as the default transfer character set in the stored procedure. Therefore, if the data table/field uses the system's default character set (such as latin1), it will not be faulty when calling the stored procedure to update some non-English string fields. However, if the character set of the data table/field is not the default character set of the system (for example, the default value is latin1 and the data table uses utf8), the problem may occur. Solution: add a line in my. cnf (my. ini in windows:

Default-character-set = utf8

Or

Character-set-server = utf8

Or. It does not work if the SET syntax is used in the mysql command line after mysqld is started.

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.