connection (session) needs to use this Buffer.#Sort_Buffer_Size is not as large as possible, because it is a connection-level parameter, too large a setting + high concurrency may deplete system memory resources. For example: 500 connections will consume 500*sort_buffer_size (8M) =4g memoryWhen the #Sort_Buffer_Size exceeds 2KB, memory allocations are made using mmap () rather than malloc (), resulting in reduced efficiency.#技术导读 http://blog.webshuo.
system
Show variables see variables, defined in the MY.CNF configuration file
Show Warnings View the most recent SQL statement generated by the error warning, see the other needs to see. err log
Show Processlist shows all the processes that are running on the system.
Show errors
Enable MySQL slow query:---Parse SQL statements to find SQL that affects efficiency
Log-slow-queries=/var/lib/mysql/slow.log This path has writable permissions for MySQL users
long_
(1) Improve the database insert performance Central idea: Try to write data at once to file and reduce the checkpoint operation of the database. The following four configuration entries were modified this time:1) Set the Innodb_flush_log_at_trx_commit configuration to 0, according to past experience set to 0, the insertion speed will be greatly improved.0:write the log buffer to the log file and flush the log file every second, but does nothing at transaction commit.1:the log buffer is written o
(1) To improve the database insert performance Central idea: as far as possible to write data to the database file and reduce the checkpoint operations. The following four configuration entries were modified this time:1) Set the Innodb_flush_log_at_trx_commit configuration to 0, according to past experience set to 0, the insertion speed will be greatly improved.
0:write the log buffer to the log file and flush the log file every second, but does nothing at transaction commit.1:the log buffer is
Tags: case log incr cannot sort ack pool nal action 1 [Mysqld]2Basedir =/data/MySQL3DataDir =/data/Mysqldata4Tmpdir =/data/mysqltmpdata//mysql Query Temp directory, avoid due to lack of disk space, resulting in related5Port =3306
6Socket =/data/mysql/Mysql.sock7init-connect='SET NAMES UTF8the '//connected character set is UTF8
8character-Set-server =UTF8//The default character set for the system is UTF89Lower_case_table_names =1
Ten
OneBack_log =1024x768
AMax_connections = the
-Max_connect_e
, improve query speed, and, if you need to sort large amounts of data, raise the value appropriately. However, MySQL will issue this buffer space for each client connection, so you should set this value as appropriately as possible to avoid excessive memory overhead.6, sort_buffer_size = 8M#是MySQL执行排序使用的缓冲大小. If you want to increase the speed of the order by, first see if you can let MySQL use the index instead of the extra sort stage. If not, you can
replaced with a buffer that is allocated on each link when the transaction first changes state.Max_heap_table_size = 64M # # # #独立的内存表所允许的最大容量Read_buffer_size = 2M # # # #MySql读入缓冲区大小.Read_rnd_buffer_size = 16M # # # #是MySql的随机读缓冲区大小.Sort_buffer_size = 8M # # # The sort buffer is used to handle the sort caused by the order by and the group by queueJoin_buffer_size = 8M # # # #此缓冲被使用来优化全联合 (full JOINs Union
each link when the transaction first changes state. max_heap_table_size=64m### #独立的内存表所允许的最大容量read_buffer_size =2M ### #MySql读入缓冲区大小. read_rnd_buffer_size=16m### #是MySql的随机读缓冲区大小. sort_buffer_size=8m#### sort buffers are used to handle similar orderby and group The by queue causes the sort join_buffer_size=8m### #此缓冲被使用来优化全联合 (full joins Union without index). thread_cache_size=8#### How many threads we kee
table is opened and placed in the table buffer, and the benefit is that the contents of the table can be accessed more quickly. In general, you can see the status values for the peak time of the database Open_tables and open_tables to determine if you need to increase the value of Table_cache, that is, if Open_tables is close to Table_cache, and Opened_ Tables This value is gradually increasing, it is necessary to consider increasing the size of this value. external-locking = FALSE #MySQL选项可以避免
) + max_connections * 2 MB #每个线程将使用2MB (MySQL AB binary version is a KB) stack, in the worst-case scenario, Sort_buffer_size + record_buffer_size Additional memory is also used. Can be changed to 512M #innodb_buffer_pool_size = 16M #主要用来存储表结构和数据字典, the more tables require more memory, you can change to 16M #innodb_additional_mem_pool_size = 2M #日志组中的每个日志文件的大小(in megabytes). If n is the number of log files in the log group (Innodb_log_files_in_group), the ideal value is 1M to the b
Tags: mysql multiple instances Linux mysqldStart multiple MySQL instances
In order to facilitate testing and final deployment may require a multi-mysql instance, here to record the method of operation, first initialize two MySQL data directory
mysql_install_db--user=mysql--datadir=/var/lib/mysql/3306/
mysql_install_db--user=mysql--datadir=/var/lib/ mysql/3307/
Then use a configuration file similar to the following, because only need to use the Blackhole Engine, most of the parameters are
/data/3306/my.cnf [
Email protected ] ~]#/bin/cp/soft/mysql-5.5.45/support-files/my-small.cnf/data/3307/my.cnfEdit Modify configuration fileNote the parameters are the port number, socket, the file location associated with each instance, and the Server-idVi/data/3306/my.cnf[Client] #password =your_password port =3306 socket =/data/3306/mysql.sock #themysqlserver [mysqld] port =3306 socket =/data/3306/mysql.sock skip-external-locking key_buffer_size=16k Max_ allowed_packet=1m table_open_cache=4 s
Summary of WAMP2.2C integrated Environment Building websiteUploading an. sql file larger than 2M via phpMyAdmin cannot upload error message no data was received to import.Either no filename was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. SeeOpen the PHP.ini configuration file to findFile_uploads = ON//whether the switch to upload files via HTTP is allowedUpload_max_filesize = 8M//upload file sizePost_max_
controller configurationModify the DRAM controller configuration.
----------------------------------------------------------------------------------
4. Memory size Recognition
For mini6410, we only need to identify whether the memory is 256 MB or MB. The two memory sizes are related to the parameters of the two registers of the DRAM controller.We must first assume the memory size, and then prove it through the read/write method. If we prove that our assumptions are incorrect, then modif
this option to assign values, such as Upload_tmp_dir = '/ LEAPSOULCN ', on behalf of the C-disk directory has a LEAPSOULCN directory, and the session configuration, if you are in the Linux environment, you must give this directory writable permissions.
How do I upload large files over 8M?
Uploading large files mainly involves configuring the upload_max_filesize and Post_max_size two options.
PHP.ini the default file upload size in the config file
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.