001—玩轉Mysql的配置文件(my.ini)

#======================================

#平臺:windows7        

#MYsql版本:mysql-5.5.62-winx64(安裝版)

#MYsql工具:SQLyog - 64 bitNavicat Premium 12

工具包地址:https://pan.baidu.com/s/17SOAmwcgOw9hYtTzDb9-Tw

#======================================

 (環境請自行搭建) 


MySQL安裝完畢後,首先找到它的配置文件:my.ini

windows下默認位置在C:\Program Files\MySQL\MySQL Server 5.5\my.ini

 

# CLIENT SECTION 

2 # ---------------------------------------------------------------------- 

3 # 

4 # The following options will be read by MySQL client applications.

 5 # Note that only client applications shipped by MySQL are guaranteed 

6 # to read this section. If you want your own MySQL client program to 

7 # honor these values, you need to specify it as an option during the 

8 # MySQL client library initialization. 

9 #

10 [client]

11 #客戶端通過3306端口連接MySql服務器,可以直接修改

12 port=3306

13 

14 [mysql]

15 #客戶端的默認字符集

16 default-character-set=gbk

 

 

 

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] 

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.

#MySQL數據庫服務器的安裝目錄

15 basedir="E:/Java/Mysql/"

16 

17 #Path to the database root

#MYsql數據庫文件目錄

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=gbk

23 

24 # The default storage engine that will be used when create new tables when

#Mysql軟件的存儲引擎

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.

#MYsql軟件的最大連接數

34 max_connections=10035 ...省略...

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=25653 ...後面省略...

 

 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章