MySQL配置文件-my.ini

  复制代码 复制代码

  1 # SERVER SECTION 2 # ---------------------------------------------------------------------- 3 # 4 # The following options will be read by the MySQL Server. Make sure that 5 # you have installed the server correctly (see above) so it reads this 6 # file. 7 # 8 [mysqld] 9 10 # The TCP/IP Port the MySQL Server will listen on 11 port=3306 12 13 14 #Path to installation directory. All paths are usually resolved relative to this. 15 basedir="E:/Java/Mysql/" 16 17 #Path to the database root 18 datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/" 19 20 # The default character set that will be used when a new schema or table is 21 # created and no character set is defined 22 character-set-server=gb2312 23 24 # The default storage engine that will be used when create new tables when 25 default-storage-engine=INNODB 26 27 # Set the SQL mode to strict 28 sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" 29 30 # The maximum amount of concurrent sessions the MySQL server will 31 # allow. One of these connections will be reserved for a user with 32 # SUPER privileges to allow the administrator to login even if the 33 # connection limit has been reached. 34 max_connections=100 35 36 # Query cache is used to cache SELECT results and later return them 37 # without actual executing the same query once again. Having the query 38 # cache enabled may result in significant speed improvements, if your 39 # have a lot of identical queries and rarely changing tables. See the 40 # "Qcache_lowmem_prunes" status variable to check if the current value 41 # is high enough for your load. 42 # Note: In case your tables change very often or if your queries are 43 # textually different every time, the query cache may result in a 44 # slowdown instead of a performance improvement. 45 query_cache_size=0 46 47 # The number of open tables for all threads. Increasing this value 48 # increases the number of file descriptors that mysqld requires. 49 # Therefore you have to make sure to set the amount of open files 50 # allowed to at least 4096 in the variable "open-files-limit" in 51 # section [mysqld_safe] 52 table_cache=256 53 54 # Maximum size for internal (in-memory) temporary tables. If a table 55 # grows larger than this value, it is automatically converted to disk 56 # based table This limitation is for a single table. There can be many 57 # of them. 58 tmp_table_size=35M 59 60 61 # How many threads we should keep in a cache for reuse. When a client 62 # disconnects, the client's threads are put in the cache if there aren't 63 # more than thread_cache_size threads from before. This greatly reduces 64 # the amount of thread creations needed if you have a lot of new 65 # connections. (Normally this doesn't give a notable performance 66 # improvement if you have a good thread implementation.) 67 thread_cache_size=8 68 69 #*** MyISAM Specific options 70 71 # The maximum size of the temporary file MySQL is allowed to use while 72 # recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE. 73 # If the file-size would be bigger than this, the index will be created 74 # through the key cache (which is slower). 75 myisam_max_sort_file_size=100G 76 77 # If the temporary file used for fast index creation would be bigger 78 # than using the key cache by the amount specified here, then prefer the 79 # key cache method. This is mainly used to force long character keys in 80 # large tables to use the slower key cache method to create the index. 81 myisam_sort_buffer_size=69M 82 83 # Size of the Key Buffer, used to cache index blocks for MyISAM tables. 84 # Do not set it larger than 30% of your available memory, as some memory 85 # is also required by the OS to cache rows. Even if you're not using 86 # MyISAM tables, you should still set it to 8-64M as it will also be 87 # used for internal temporary disk tables. 88 key_buffer_size=55M 89 90 # Size of the buffer used for doing full table scans of MyISAM tables. 91 # Allocated per thread, if a full scan is needed. 92 read_buffer_size=64K 93 read_rnd_buffer_size=256K 94 95 # This buffer is allocated when MySQL needs to rebuild the index in 96 # REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE 97 # into an empty table. It is allocated per thread so be careful with 98 # large settings. 99 sort_buffer_size=256K 复制代码 复制代码