MySQL's performance optimization and usage tips

Source: Internet
Author: User

This article is summed up from the work of the author. Because the time problem and the consideration cannot be comprehensive enough, so this article will be completed for a long time, the following will give the content, share ^_^

Under Windows, the configuration file is%mysql_home%/my.ini

Under Linux, the configuration file is/etc/my.cnf

One performance optimization

1--------innodb_buffer_pool_size

This parameter is the main performance parameter of the InnoDB engine, which plays a decisive role in the performance of the database. The white is the memory used by the database.

2--------Performance Analysis,

Show status like '% '; #查看数据库状态

Show variables like%; #查看数据库的变量

Show Engine InnoDB status\g; #查看innodb的监控状态

Two use skills

1--------character Set as much as possible to use uft-8, so easier to solve the garbled problem, in the Linux modified My.cnf 3, before and after the change can be ordered

Show variables like ' character% ';

View the status of the character set.

Locate the client configuration [clients] add below

#默认字符集为utf8

Default-character-set=utf8

After finding [mysqld] Add

#默认字符集为utf8

Default-character-set=utf8

#设定连接mysql数据库时使用utf8编码 to keep the MySQL database running for UTF8

init_connect= ' SET NAMES UTF8 '

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.