Old boy Education daily-88th day-how does the enterprise produce MySQL optimized?

Source: Internet
Author: User
Tags file permissions

Reference Answer:

A: Optimization of hardware:

1, using 64-bit CPU,CPU at least 4, L2 cache the bigger the better
2, memory is large, 32-64g run 1-2 instances, 96-128g run 3-4 instances
3, the mechanical disk select SAS disk, rotate speed 15000 above, use SSD if possible
4, RAID card use RAID10
5, multi-block network card, more than gigabit
6, the database do not use virtualization, slave hardware better than master

B: Operating system optimization

1, the operating system chooses x86_64 bit, uses the XFS file system as far as possible
2. Optimize disk storage parameters
3. Optimize kernel parameters
4, optimize the network, etc.

C:mysql Frame Optimization

1, according to the memory size, configure the server to run multiple instances
2, master-slave replication using mixed mode, try not to cross the computer room synchronization, to cross the room, as far as possible to use remote write, local read
3, regular inspection, repair the data differences between master and slave replication
4, business split, the search function does not use the MySQL database execution; some high concurrency, security-general business uses NoSQL, such as: Memcache, Redis, etc.
5, the database front-end plus cache, such as memcache, for user login, product search
6, Dynamic Data static, the entire file static, page fragment static
7, the database cluster read and write separation, a master more from, through the dbproxy to read and write the separation of the cluster
8, the single table more than 8 million, the demolition of the table, such as manual (login, goods, orders) to open the table to be removed from the library
9, select the backup from the library, and the database for the Sub-table sub-Library backup

D:mysql Database Level optimization

1. Optimize MY.CNF parameters
2, optimize the library table design, including character set, string length, create short index, multi-use composite index;
3, SQL statement optimization, reduce the number of slow statements;

E: Database management process, system optimization

1, the Human flow: development----core operation and maintenance/DBA
2, Testing Process: Intranet IDC Test line execution
3, client management, PHPMYADMIN

F:mysql Database Security Optimization

1, the database is forbidden to set up the external network
2, database file permissions optimization;
3, the authorized user permission limit, as far as possible special library dedicated account
4, restrict the development of the operation of the production library permissions
5. Prevent SQL Statement Injection

Note

Today is the 88th Day of the day to accompany you and look forward to your progress .

For questions and answers, please leave a comment in the blog comments section .
Index of the topic of the previous period

http://lidao.blog.51cto.com/3388056/1914205

This article is from the "Lee blog" blog, make sure to keep this source http://lidao.blog.51cto.com/3388056/1945391

Old boy Education daily-88th day-how does the enterprise produce MySQL optimized?

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.